Part Two : Implementation using Google Tag Manager V2

by on

filed under

Now, after reading through the changes brought by Google in v2 and learning about newer variables (built-in and user), it’s time for business. Incase you have missed reading it, do have a quick read(link)

Moving on, let’s learn how you can create a tag in GTM, review the changes and publish the container successfully. You shall also get insights on the newly introduced triggers (earlier called firing rules).

Section 2.1:Create a tag and Publish the container

Step 1: Click on Add a new tagoption present on the interface

Step 2: Choose which type of product you want to create. Key products include Google Analytics, Google Adwords, as well as new products such as LinkedIn.

Here, you should choose Google Analytics if you want to trigger a pageview tag.

Step 3: Click on Universal Analytics or Classic GA depending on your GA code.

Step 4: Enter your Tracking ID, Click on Enable Advertising Features. The rest of the options, including Track Type, More Settings and Advanced Settings remain the same as v1.

Step 5: Choose All Pages if the tag is a GA pageview tag. For other event based or form based tags, click on Click and Form respectively and follow the process as specified in the Trigger section.

Step 6: Click on Save, and the tag is created successfully.

Step 7: For testing the tag, click on the Preview button

Step 8: The preview and debug version is now ready. If the tag is firing correctly, you can choose to click on Leave PreviewMode.

Step 9: Choose to create the version if you want the current changes to be saved as a separate version.

Step 10: The version shall be created and a success message shall be created

Step 11: This is the final step to publish the container and make the tags live. Click on Publish for the container to go live with your changes.

Step 12: GTM shall summarize the changes made and list them to you

Step 13: If you have tested all the tags successfully, you can now click on Publish Now.

Section 2.2 : Decoding the Triggerand Blocking Trigger

Step 1: Choose Event

The Event options are explained as,

1. Page View: The pageview has been split up into three triggertypes –

  1. The defaultPage Viewwhich fires as soon as GTM container gets loaded
  2. DOM is ready
  3. Window load event has fired

The Page View event should be used for any code which you would like to fire as soon as possible

2. Click: The Click event has been split into two trigger types –

  1. Link Click
  2. Click

The Click event should be fired when a user clicks on a link or any other on-page element.

3. Form: The form event should be triggered when the user submits a form, which can be a contact us or a lead generation form

4. History Change: This shall be used when the URL changes and the page is not reloaded. This is useful when you want to fire a pageview for #pages

5. Custom Event: This shall be used for triggering dataLayer events. Eg :{‘event’:'event new homepage’}. The trigger accepts RegEx matches

6. JavaScript Error: This shall be used when you want to fire Google Analytics Events when a JavaScript error occurs

7. Timer: This helps the user fire a trigger on a set interval of time, like every five seconds, up to anstipulated limit. The timer trigger can be used to fire GA interaction events.

Step 2:Configure Trigger

Afterthe Trigger event has been selected, you will need to configure the conditions and properties of the required event. Here, you can specify specific variations of the trigger event type you have selected. For example, you can change the Pageview Trigger event to fire when the window load event is ready, or select the Click event you want is a Link Click. You can also choose certain conditions which include firing the trigger event when all of the form fields on the page are validated correctly, or delaying the next page to get loaded for a specified length of time so that your tags have time to fire.


Step 3: Fire On

When you have finished configuring your tag, you need to add the Fire On conditions. This is similarto the Firing Rules of v1, except that the {{event}} condition has been already specified (e.g. : image on the right) on Step 2.

Similar to how firing rules used to work in v1, the Trigger with Fire On shall only fire if all the conditions specified are satisfied.

Eg :If you want to trigger a conversion pixel on a thank you page, choose {{Page URL}} equals /thank-you-for-your-application

You must either use RegEx to match multiple conditions or create additional Triggers for each condition you would like your Trigger to fire on.

Step 3.1: Enable When

*This is an additional step which appears when either the Link Click or Form Trigger event are chosen

If you have selected the Form or Link Click Trigger event type and checked either Wait for Tags or Enable Validation, you shall need to add an Enable When condition.

This is different than Fire On since this condition allows you to specify when you do/do not want the Trigger to be available. Since Wait For Tags could occasionally cause conflicts with other on-page code, the Enable When condition should be used with caution.Google recommends enabling this trigger only on the pages where you need it, and testing your changes before publishing, by using the Preview tool across multiple browsers.

Step 4: Click on Save Trigger and the changes made to your trigger shall be saved successfully.

Blocking Triggers

Blocking Rules in GTM v1 has been replaced by Blocking Triggers. A blocking trigger basically tells GTM when the tag should not fire.

Use these steps to create a blocking trigger (or blocking rule). The whole process of creating a blocking trigger is same as in the case of creating a regular trigger.

Step 1: Clickon the ‘Create Exceptions’ link while creating your tag

Note: If your trigger contradicts your blocking trigger then the blocking trigger takes precedence.

For example, if you set a trigger to fire an event tag on all pages of your website and then you set a blocking trigger which prevents the same tag from firing on the homepage then then your trigger will fire tag on all pages of your website except the homepage.

Step 2: Click on New for a specifying a new trigger, or choose from the list of existing triggers. You have now successfully created a blocking trigger.

To summarize, the key pointers for you, going forward from GTM v1 to GTM v2,

  • Firing rules have been renamed as triggers
  • Macros have been renamed as variables
  • Auto-Event Listener Tags are not required anymore in v2
  • A new category of variables have been introduced called as built-in variables. Built-in variables are the same as the pre-defined macros in v1.
  • Triggersare now a 3-step process

With these changes, the Google Tag Manager v2 interface does promise to make our lives easier (let’s hope so!).

Please post your questions and feedback in the comments below.

For any queries, please feel free to mail at

- Soham Shah (Web Analytics)

Leave a Reply

Your email address will not be published. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>