You are here

public static function AnalyticsJsMarkup::isDntEnforced in Analytics 8

Checks if the Do Not Track protection is enabled.

Return value

bool

1 call to AnalyticsJsMarkup::isDntEnforced()
AnalyticsJsMarkup::create in src/Render/AnalyticsJsMarkup.php
inheritdoc}

File

src/Render/AnalyticsJsMarkup.php, line 49

Class

AnalyticsJsMarkup
Defines an object that passes safe strings through the render system.

Namespace

Drupal\analytics\Render

Code

public static function isDntEnforced() {
  if (!isset(static::$isDntEnforced)) {
    static::$isDntEnforced = \Drupal::config('analytics.settings')
      ->get('privacy.dnt');
  }
  return static::$isDntEnforced;
}