google_analytics_et.module in Google Analytics Event Tracking 8
Same filename and directory in other branches
Contains google_analytics_et.module.
File
google_analytics_et.moduleView source
<?php
/**
* @file
* Contains google_analytics_et.module.
*/
use Drupal\Core\Routing\RouteMatchInterface;
/**
* Implements hook_help().
*/
function google_analytics_et_help($route_name, RouteMatchInterface $route_match) {
switch ($route_name) {
// Main module help for the google_analytics_et module.
case 'help.page.google_analytics_et':
$output = '';
$output .= '<h3>' . t('About') . '</h3>';
$output .= '<p>' . t('Allows configuration for tracking user interaction events with Google Analytics.') . '</p>';
return $output;
default:
}
}
/**
* Implements hook_page_attachments().
*/
function google_analytics_et_page_attachments(&$attachments) {
// Add our effective JS attachments and settings (if any).
\Drupal::service('google_analytics_event_tracking')
->addAttachments($attachments);
}
Functions
Name | Description |
---|---|
google_analytics_et_help | Implements hook_help(). |
google_analytics_et_page_attachments | Implements hook_page_attachments(). |