eloqua.module in Eloqua 8
Same filename and directory in other branches
Eloqua Integration Module
This module provides Eloqua visitor tracking and some basic configuration.
@package Eloqua
File
eloqua.moduleView source
<?php
/**
* @file
* Eloqua Integration Module
*
* This module provides Eloqua visitor tracking and some basic configuration.
*
* @package Eloqua
*/
/**
* Implements hook_page_attachments().
*
* Sets site identifier and adds Eloqua tracking code.
*
* @see \Drupal\eloqua\EventSubscriber
*/
function eloqua_page_attachments(array &$page) {
$config = \Drupal::config('eloqua.settings');
$state = \Drupal::state()
->get('eloqua.condition_result') ?: 0;
if (null !== $config
->get('site_identifier') && $state) {
$page['#attached']['drupalSettings']['eloqua']['siteID'] = $config
->get('site_identifier');
$page['#attached']['library'][] = 'eloqua/eloqua';
}
}
Functions
Name | Description |
---|---|
eloqua_page_attachments | Implements hook_page_attachments(). |