You are here

function analytics_page_attachments in Analytics 8

Implements hook_page_attachements().

File

./analytics.module, line 34

Code

function analytics_page_attachments(array &$attachments) {
  if (\Drupal::config('analytics.settings')
    ->get('privacy.dnt')) {
    $attachments['#attached']['library'][] = 'analytics/dnt';
  }
}