Learn business growth with Google Analytics 4 Forums Google Analytics 4 How to setup a Google Tag Manager trigger targeting a specific entry in a Regular Expression table

  • How to setup a Google Tag Manager trigger targeting a specific entry in a Regular Expression table

    Posted by Connor on 27 May 2022 at 2:53 am

    Hey friends, I wonder if you could shed some light on this for me. I was able to set up content grouping in GTM through a RegEx table which pushed data to my Google Analytics 4. Now, I’m working on a trigger that will work when a visitor lands on a specific group of pages. I’m thinking I could just add a new entry in that existing content group RegEx table.

    I’m familiar with creating triggers that target a RegEx table, but I’m stuck here because I need to target a specific entry in the table. Can any of you guide me on how I could achieve this?

    I know I could create another content group, but I’m worried that if I have to create a dedicated RegEx table for each case it could make my container quite messy. I’d appreciate any suggestions!

    Aubrey replied 1 year, 4 months ago 3 Members · 2 Replies
  • 2 Replies
  • Jayden

    Member
    1 December 2022 at 10:25 pm

    In Google Tag Manager, you don’t need a separate Regex table for each case. By using lookup tables, you can commit to maintaining just one table and simply add entries to it. When setting up your trigger, use the value of your relevant variable (like Page Path) to match the exact entry in the Regex table. This way, the trigger would be fired only when the user lands on a page that matches that specific entry. It’s that simple, and your container stays clean!

  • Aubrey

    Member
    22 January 2023 at 3:49 am

    In GTM, instead of creating a new RegEx table for each trigger, you can create a single trigger that looks at the ‘Page Path’ (or similar variable) against your RegEx table. Check if the output matches with the specific group name or page path you are interested in. This would trigger when someone lands on one of those specific group of pages and keeps things clean in your container.

Log in to reply.