Google Tag Manager Integration

From ClickTale Wiki
Jump to: navigation, search

Google Tag Manager (GTM) enables a website manager to quickly and easily deploy and update 3rd-party tools’ tags on the site’s pages.

How it works

In this solution, we deploy only the ClickTale Bottom code, since the code is deployed a-synchronously and the Top code cannot be set to be inserted after the <body> tag in real time.

You should insert the ClickTale Top code outside of Google Tag Manager.

NOTE - Please do not use the “ClickTale Standard Tracking” tag from the GTM menu. It is outdated and not supported.

Inserting the Bottom code

  1. Create a new container (or add the below to an existing container).
  2. Create a new Custom HTML tag in your GTM container.
  3. Copy and paste your project’s bottom code (from the ClickTale account) into the new tag. *
  This is the same for both Atlas and Balkan code types.
4. Check the “Support document.write” checkbox. *

GTM add tag.png

Click the image to
view full size

5. Create a rule in GTM to load the ClickTale code on all pages (or just the pages you want it on).

GTM add rule.png

Click the image to
view full size

6. Save the new rule.
7. Save the new tag and publish the updated version of the container.

Your ClickTale code should now deploy through Google Tag Manager.

Trans5x5.gif * If your website is required to deploy XHTML-compliant code, please modify the following steps:

In step 3 - Copy the XHTML-compliant version of the ClickTale code from here - Atlas version, Balkan version.

   Atlas - Replace the project settings in the code with your project’s settings.
   Balkan - Replace the URLs in the code with your project’s URL references (xxx.js).

In step 4 - Leave the “Support document.write” checkbox unchecked.

Complete other steps as described above.

Important note: You must contact ClickTale support if you wish to use the XHTML-Compliant version of the code. A special definition on the ClickTale server is required in this case.