function amp_analytics_preprocess_amp_analytics in Accelerated Mobile Pages (AMP) 7
Implements hook_preprocess_amp_analytics().
File
- modules/
amp_analytics/ amp_analytics.module, line 49 - AMP Analytics submodule.
Code
function amp_analytics_preprocess_amp_analytics(&$variables) {
$variables['analytics_attributes'] = drupal_attributes($variables['analytics_attributes_array']);
$variables['analytics'] = array(
'vars' => array(
'account' => variable_get('amp_google_analytics_id'),
),
'triggers' => array(
'trackAmpview' => array(
'on' => 'visible',
'request' => 'pageview',
),
),
);
}