public function GTMContainer::snippets in GoogleTagManager 7.2
Returns array of JavaScript snippets.
Return value
array Associative array of snippets keyed by type: script, noscript and data_layer.
File
- includes/
entity/ container.inc, line 211
Class
- GTMContainer
- Defines the container configuration entity.
Code
public function snippets() {
$snippets = array(
'script' => $this
->scriptSnippet(),
'noscript' => $this
->noscriptSnippet(),
'data_layer' => $this
->dataLayerSnippet(),
);
// Allow other modules to alter the snippets.
drupal_alter('google_tag_snippets', $snippets, $this);
return $snippets;
}