Creating Triggers in GTM: A Step-by-Step Guide for Firing on Specific Pages with Matches RegEx

gtm trigger specific pages

At PPCMania, we understand the importance of tracking user behavior on websites. Google Tag Manager (GTM) is an excellent tool for tracking user actions, but sometimes it can be challenging to fire specific tags on pages with complex URLs. This is where the “matches RegEx” trigger in GTM comes in handy. In this article, we will provide you with a step-by-step guide to firing tags on specific pages using the “matches RegEx” trigger.

Creating a trigger in Google Tag Manager (GTM) that fires on specific pages is a simple process. Here are the steps you can follow:

Step 1: Log in to your GTM account and select the container where you want to create the trigger.

Step 2: Click on the “Triggers” button located on the left-hand side of the screen.

gtm - create new trigger

Step 3: Click on the “New” button to create a new trigger.

Step 4: Select “Page View” as the trigger type.

Step 5: In the “This trigger fires on” section, select “Some Page Views.”

Step 6: In the “Fire this trigger when” section, select “Page Path” from the drop-down menu.

Step 7: In the “Page Path” field, enter the specific page or pages on which you want the trigger to fire. You can use regular expressions to match multiple pages. For example, if you want the trigger to fire on pages with the path “/about” or “/contact,” you would enter “^/(about|contact)”.

gtm - page path regex

In this article, we have provided you with a step-by-step guide to firing tags on specific pages using the “matches regex” trigger in Google Tag Manager. With this trigger, you can match specific patterns in your URLs, making it easier to fire tags on pages with complex URLs. By following these steps, you can improve your website’s performance and gain valuable insights into how users are interacting with your website.

Armen Adamyan
Rate author
PPC mania
Add a comment