Mobile app version of vmapp.org
Login or Join
Vandalay111

: How to exclude traffic with a URL query String from Google Analytics using Google Tag Manager I tried: Create Variable: Variable type: URL Component type: Query Query Key: "ignoreme", URL Source:

@Vandalay111

Posted in: #GoogleAnalytics #GoogleTagManager #QueryString

I tried:


Create Variable:


Variable type: URL
Component type: Query
Query Key: "ignoreme", URL Source: Page URL/Default

Create Trigger:


Trigger type: Page view
This trigger fires on: Some page views
Fire this trigger when an Event occurs and all of these conditions are true: ignoreme does not equal "1"



However, when I go to example.com?ignoreme=1, the Google Analytics still counts it as a visit and shows me as a visitor. I have published the changes in GTM and deleted my browser cookies.

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Vandalay111

1 Comments

Sorted by latest first Latest Oldest Best

 

@Pierce454

Here's how you can do it.

Create a pageview trigger:


Fire on: some pageviews.
Fire trigger on:
"Page URL" + "matches RegEx (ignore case)" + "ignoreme=1"


Save trigger.

Edit your Tag for sending "All pages" pageviews to GA.


Scroll down to Triggering and add Exception.
Pick the trigger you created as an exception.


Save Tag and preview it before you publish.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme