function hook_google_tag_realm_alter in GoogleTagManager 7
Same name and namespace in other branches
- 7.2 google_tag.api.php \hook_google_tag_realm_alter()
Alter the realm values for the current page response.
This hook allows other modules to alter the realm values that affect the snippets to be inserted.
Parameters
array $realm: Associative array of realm values keyed by name and key.
1 function implements hook_google_tag_realm_alter()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- gtm_test_google_tag_realm_alter in tests/
gtm_test.module - Implements hook_google_tag_realm_alter().
1 invocation of hook_google_tag_realm_alter()
- google_tag_realm_values in ./
google_tag.module - Returns applicable realm name and key for the request.
File
- ./
google_tag.api.php, line 39 - Documents hooks provided by this module.
Code
function hook_google_tag_realm_alter(array &$realm) {
// Do something to the realm values.
$realm['name'] = 'my_realm';
$realm['key'] = 'my_key';
}