You are here

function hook_google_tag_insert_alter in GoogleTagManager 7

Same name and namespace in other branches
  1. 8 google_tag.api.php \hook_google_tag_insert_alter()
  2. 7.2 google_tag.api.php \hook_google_tag_insert_alter()

Alter the state of snippet insertion on the current page response.

This hook allows other modules to alter the state of snippet insertion based on custom conditions that cannot be defined by the status, path, and role conditions provided by this module.

Parameters

bool $satisfied: The snippet insertion state.

1 invocation of hook_google_tag_insert_alter()
google_tag_insert_snippet in ./google_tag.module
Determines whether to insert the snippet on the response.

File

./google_tag.api.php, line 25
Documents hooks provided by this module.

Code

function hook_google_tag_insert_alter(&$satisfied) {

  // Do something to the state.
  $state = !$state;
}