public function Container::environmentQuery in GoogleTagManager 8
Returns a query string with the environment parameters.
Return value
string The query string.
2 calls to Container::environmentQuery()
- Container::noscriptSnippet in src/
Entity/ Container.php - Returns JavaScript noscript snippet.
- Container::scriptSnippet in src/
Entity/ Container.php - Returns JavaScript script snippet.
File
- src/
Entity/ Container.php, line 343
Class
- Container
- Defines the container configuration entity.
Namespace
Drupal\google_tag\EntityCode
public function environmentQuery() {
if (!$this
->get('include_environment')) {
return '';
}
// Gather data.
$environment_id = $this
->variableClean('environment_id');
$environment_token = $this
->variableClean('environment_token');
// Build query string.
return ">m_auth={$environment_token}>m_preview={$environment_id}>m_cookies_win=x";
}