Add GA Triggers in Google Tag Manager

Contributors

@victoriadynamicdata-agency


Business Benefits

Fire tags when users take specific actions on your website.


Sign in into Google Tag Manager, navigate to the Triggers option under the left menu, and click New to create a new trigger.

The Trigger section will be empty when you first create a container, and you will need to create your first trigger.

Enter a name for the trigger in the Untitled Trigger field and select the type of trigger to use.

Trigger types are grouped under trigger categories based on the action being performed. Specifically:

  • Page View: fire tags when users visit specific pages on your site.
  • Click: fire tags when users click on specific elements on your pages.
  • User Engagement: fire tags when users make specific actions on your site as viewing an element, submitting a form, scrolling and watching a video.
  • Custom event: trigger tags by sending events directly to the dataLayer.
  • History change: trigger tags when the URL fragment changes or when the site uses the HTML5 pushtate API. This is useful to fire tags on single page applications websites.
  • JavaScript Error: fire tags when an uncaught JavaScript exception occurs.
  • Timer: allows you to send events at timed intervals.
  • Trigger group: the tag will only fire after all of the selected triggers have fired at least once.

  • For example, if you wanted to create a trigger that fired whenever a user clicked a link or a button, you would choose a Just Links trigger.

Configure the conditions for your chosen trigger to fire and click Save to create the trigger.

  • Following the earlier example, selecting All Link Clicks would cause the trigger to fire every time a user clicks on a link.
  • If you want the trigger to be fired only on certain elements, you could select Some Link Clicks and add the condition to define when the trigger must be fired.
  • For example, if you want it to fire only when Buy buttons are clicked, you could set the conditions to fire the trigger only when the button text contains the word “Buy”.

The trigger will then appear in your list of Triggers.

Preview the container and perform the action that triggers the tag to fire to test the new trigger.

  • Open the tag you want to fire with the new trigger or create a new tag and choose the trigger to make the tag fire.
  • Once you perform the action that triggers the tag you will be the event fired on the preview window.

Last edited by @hesh_fekry 2023-11-14T15:40:37Z