Matt Poldberg
Matt Poldberg

Reputation: 38

Is there a way to batch upload URLs as Triggers into Google Tag Manager?

I have a list of a 100+ unique URLs and I want to use them as Triggers for a couple different audience tags. Sadly they have no common path thread that could be used to shorten/batch the process. Currently I am making each one into a path Trigger and then assigning it to the proper audience. It would be great if there was a way to upload a group of them to one trigger as an "or" type list, or to batch upload them as different triggers and then assign them to each tag individually.

Upvotes: 0

Views: 941

Answers (2)

Ben Church
Ben Church

Reputation: 33

Alternatively you can use 'Some Page Views' and 'matches RegEx':

  • Make a list of all URLs and remove the protocol, subdomain, domain name and slashes from them all (so 'https://www.example.com/my-page/' becomes 'my-page' without quotes).
  • Put all of these partial URLs into a list separated by |
  • So: |my-page-1|my-page-2|my-third-page|
  • Create a Page View trigger
    • Select 'Some Page Views', then...
    • Page URL, matches RegEx, [paste list of bar separated partial URLs]
    • Save

Google Tag Manager using matches RegEx to find generic 'terms of service' and 'about' style pages

Upvotes: 0

Eike Pierstorff
Eike Pierstorff

Reputation: 32780

After re-reading the question, this might be a good job for a lookup table. Input variable would be page path and you would be setting the output value to true if the path is matched by your urls (and false as the default value). Then all urls are in one place and you'd need to assign only one trigger to your tags.

enter image description here

Upvotes: 3

Related Questions