google_adwords.module in Google AdWords Conversion Tracking 8
Same filename and directory in other branches
Google Adwords Conversion Tracking Module.
File
google_adwords.moduleView source
<?php
/**
* @file
* Google Adwords Conversion Tracking Module.
*/
/**
* Implements hook_page_attachments_alter
*
* Attach any added trackings to the page element as #attachments
*
* @param array $page
*/
function google_adwords_page_attachments_alter(array &$page) {
/**
* @var Drupal\google_adwords\GoogleAdwordsTracker $adwords_tracker
*/
$adwords_tracker = \Drupal::getContainer()
->get('google_adwords.tracker');
if ($adwords_tracker
->hasTracking()) {
$adwords_tracker
->attachTrackingToElement($page);
}
}
Functions
Name | Description |
---|---|
google_adwords_page_attachments_alter | Implements hook_page_attachments_alter |