public function VisiblityTracker::__construct in Google Analytics 4.x
Constructor.
Parameters
\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The config factory service.
\Drupal\path_alias\AliasManagerInterface $alias_manager: The alias manager service.
\Drupal\Core\Path\PathMatcherInterface $path_matcher: The path matcher service.
\Drupal\user\UserDataInterface $user_data: The user data service.
File
- src/
Helpers/ VisiblityTracker.php, line 53
Class
- VisiblityTracker
- Defines the Path Matcher class.
Namespace
Drupal\google_analytics\HelpersCode
public function __construct(ConfigFactoryInterface $config_factory, AliasManagerInterface $alias_manager, PathMatcherInterface $path_matcher, UserDataInterface $user_data, CurrentPathStack $current_path) {
$this->config = $config_factory
->get('google_analytics.settings');
$this->aliasManager = $alias_manager;
$this->pathMatcher = $path_matcher;
$this->userData = $user_data;
$this->currentPath = $current_path;
}