You are here

analytics.theme.inc in Analytics 7

File

analytics.theme.inc
View source
<?php

function theme_analytics_js(array $variables) {
  if (variable_get('analytics_privacy_dnt', TRUE)) {
    $output = 'if (!Drupal.settings.dnt) {' . "\n";

    //$output .= "alert('TRACKING!');";
    $output .= trim($variables['js']) . "\n}";

    //$output .= "else { alert('NOT TRACKING!'); }";

    //$output .= "console.log(Drupal.settings.dnt);";
    return $output;
  }
  else {
    return $variables['js'];
  }
}

Functions

Namesort descending Description
theme_analytics_js