Note
Note: Access to this article does not require a login on Sizmek Ad Suite (SAS).
The article can be shared with webmasters and other users who do not have a login for SAS.
The following article details the Tag Manager integration with Google Tag Manager (GTM).
Tag Manager can be integrated with GTM.
-
SAS Customer Success Manager configures and generates the Tag Manager code in SAS.
-
SAS Customer Success Manager sends the Tag Manager code to the GTM administrator.
-
In the GTM, the administrator does the following:
-
Open the account.
-
Create a new tag.
-
Name the tag Tag Manager and select Custom HTML for the tag type.
-
Paste the Tag Manager code, provided by SAS, into the HTML box.
-
Select the Support document.write check box.
Note
Note: The Support document.write option is probably not needed since OneTag does not use document.write directly anymore. However, third-party scripts, that are executed by a rule match, might contain document.write, so we recommend selecting this check box to avoid any unexpected bugs.
-
Select the default All Pages in the Triggering section.
-
Publish the GTM.
-
You can pass variables to Tag Manager to use for sales conversion activities and dynamic retargeting activities.
-
Administrator creates a new User-Defined Variable for each parameter to be collected.
-
Reference this user-defined variable by Overriding Existing Configuration.
-
Follow the steps under Configure and Implement Tag Manager with GTM.
-
In GTM, the administrator creates a User-Defined Variable.
-
Give the variable a name.
-
Select the Auto-Event Variable as the variable type.
-
Select Element ID from the Variable Type list, and click SAVE.
-
-
In GTM, administrator creates a new tag.
-
Name the Tag TM_generateRequest and choose Custom HTML as tag type.
-
Paste the following into the HTML box:
<script> versaTagObj.onready(function() { versaTagObj.generateRequest("http://www.{{Page Hostname}}/{{VariableName}}"); }); </script>
Note
Notes:
-
GTM automatically replaces
{{Page Hostname}}
with the site’s domain (and subdomain, if applicable). -
The reference
{{VariableName}}
is used to illustrate the example. The actual value within the brackets {{}} should be replaced by the name given to the variable in step 1. For example, If the variable was namedSubmitButtonClick
, then the reference to it in thegenerateRequest
method would be:versaTagObj.generateRequest("http://www.{{Page Hostname}}/{{SubmitButtonClick}}");
.
-
-
-
Under Advanced Settings > Tag Sequencing perform the following actions:
-
Select Fire a tag before TM_generateRequest fires and select Tag Manager as the setup tag.
-
Select Don’t fire TM_generateRequest() if Tag Manager fails.
This will ensure that TM_generateRequest() only fires after Tag Manager has successfully fired.
-
-
Add a trigger to initiate the firing of the TM_generateRequest tag, commonly on user clicks:
-
Add a new trigger using All Elements type.
-
Select Some Clicks.
-
Define firing conditions based on the elementID (taken from the Page source/HTML tag properties) that is stored by the variable created in step 1.
-
Select Save.
-
-
Publish the GTM.
Comments