: 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:
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.
More posts by @Vandalay111
1 Comments
Sorted by latest first Latest Oldest Best
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.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.