You are here

public function GoogleAnalyticsEventTracking::isTrackerActive in Google Analytics Event Tracking 8

Same name and namespace in other branches
  1. 8.2 src/GoogleAnalyticsEventTracking.php \Drupal\google_analytics_et\GoogleAnalyticsEventTracking::isTrackerActive()

Evaluates whether the provided event tracker is active in current context.

Parameters

\Drupal\google_analytics_et\Entity\GoogleAnalyticsEventTrackerInterface $tracker:

Return value

bool

1 call to GoogleAnalyticsEventTracking::isTrackerActive()
GoogleAnalyticsEventTracking::addAttachments in src/GoogleAnalyticsEventTracking.php
Adds our JS library and drupalSettings to provided page attachments.

File

src/GoogleAnalyticsEventTracking.php, line 104

Class

GoogleAnalyticsEventTracking

Namespace

Drupal\google_analytics_et

Code

public function isTrackerActive(GoogleAnalyticsEventTrackerInterface $tracker) {
  return $this
    ->pathMatch($tracker) && $this
    ->languageMatch($tracker) && $this
    ->contentTypeMatch($tracker);
}