GoogleTagManager
extends AbstractHelper
in package
GoogleTagManager view helper
Tags
Table of Contents
- $gtmContainerId : string|bool
- GTM Container ID (false if disabled)
- __construct() : mixed
- Constructor
- getBodyCode() : string
- Returns GTM code block meant for the <body> element.
- getHeadCode() : string
- Returns GTM code block meant for the <head> element.
Properties
$gtmContainerId
GTM Container ID (false if disabled)
protected
string|bool
$gtmContainerId
Methods
__construct()
Constructor
public
__construct(string|bool $gtmContainerId) : mixed
Parameters
- $gtmContainerId : string|bool
-
Container ID (false if disabled)
Return values
mixed —getBodyCode()
Returns GTM code block meant for the <body> element.
public
getBodyCode() : string
Return values
string —getHeadCode()
Returns GTM code block meant for the <head> element.
public
getHeadCode() : string