function google_tag_snippets in GoogleTagManager 7
Returns JavaScript snippets.
Return value
array Associative array of snippets keyed by type: script, noscript and data_layer.
1 call to google_tag_snippets()
- _google_tag_snippets_save in includes/
admin.inc - Saves JS snippet files based on current settings.
File
- includes/
snippet.inc, line 17 - Contains the JavaScript snippet insertion code.
Code
function google_tag_snippets() {
$snippets = array(
'script' => _google_tag_script_snippet(),
'noscript' => _google_tag_noscript_snippet(),
'data_layer' => _google_tag_data_layer_snippet(),
);
// Allow other modules to alter the snippets.
drupal_alter('google_tag_snippets', $snippets);
return $snippets;
}