Google Tag Manager (GTM) is a free and easy to use platform that allows you to manage CoolaData’s code snippets and firing of events without having to edit the code of your site or application.

Using GTM it is possible to go deeper. GTM offers Macros and Data Layer Objects that provide ways of listening to events (as opposed to simple pageviews) and registering their particular properties. However, this would require changes at the code level of your site. It is up to you to decide if it is not simpler, in these cases, to implement the CoolaData JavaScript SDK directly in your site, without GTM.

For more information on Google Tag Manager visit: and

This post will will walk you through configuring Cooladata JavaScript Tracker via Google Tag Manager.

Installing GTM

  1. Open Google Tag Manager
  2. If you haven’t yet, sign up for an account (free).
  3. Create a new Container: name your container (“Cooladata”), and choose Web as the type:
  4. You will be asked to add a code snippet to your site. Follow the instruction on screen to implement GTM on your site.

Creating the CoolaData Tracker Init tag

  1. Click “New Tag” to create the basic tracker tag.
  2. Choose tag type from the list – “Custom HTML Tag”
  3. Paste the CoolaData JS Setup snippet (can be found in under Project – Event Source – JS) in the HTML section.
  4. Choose the trigger “All Pages”
  5. Name the tag: “Cooladata-tracker”
  6. Save the tag.

Creating custom event tags

  1. Create a new tag and select type – “Custom HTML Tag”.
  2. Paste the CoolaData JS Track Event snippet (can be found in under Project – Event Source – JS) in the HTML section. Enter the event name and properties you wish to track. For example:
    <script type="text/javascript">
      cooladata.trackEvent('Add Item', {
        'Type': 'T-Shirt',
        'Amount': 2,

  3. Create a new trigger according to the action you wish to track:
  4. Name the tag and save it:

Publishing tags

To publish your changes to production, name the new version and click Publish:

Print Friendly, PDF & Email