To trigger a tag in Google Tag Manager based on a specific URL path, you should create a "Page View" trigger and configure it to fire only on pages that match your desired URL path.

This is achieved by using a "Some Events" condition within the trigger, and then specifying the "Page Path" variable to match a specific value or pattern.

Here's a step-by-step guide:

  1. Create a New Trigger: In your GTM container, navigate to "Triggers" and click "New".

  2. Choose Trigger Type: Select "Page View" as the trigger type.

  3. Configure Trigger:

  4. Save the Trigger: Give your trigger a descriptive name and save it.

  5. Associate with Tags: Go to the tag you want to fire and select the newly created trigger under "Triggering".

  6. Test and Publish: Use GTM's preview and debug mode to test the trigger and ensure it fires as expected before publishing the container.

    螢幕截圖 2025-07-15 09.45.35.png

Example:

Let's say you want to trigger a tag on all pages within the

/products/

section of your website. You would configure the trigger like this: