Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Universal Analytics (analytics.js) Ignoring own traffic

From google's documentation:

The analytics.js snippet is part of Universal Analytics, which is currently in public beta. New users should use analytics.js. Existing ga.js users should create a new web property for analytics.js and dual tag their site. It is perfectly safe to include both ga.js and analytics.js snippets on the same page.

However, I can't seem to find a way to set up a filter to exclude my own traffic with a cookie. There is this for ga.js, but as far as I can tell there is no way to set a custom variable with analytics.js, and I get get a custom dimension to work.

Edit: What I've done thus far:

  1. Set up a custom dimension called 'ignore' in GA via the UI
  2. Created a filter specifying the custom dimension from step 1
  3. called ga('set', 'dimension1', 1); my website

traffic is not ignored

like image 287
Greg Dean Avatar asked Oct 28 '13 01:10

Greg Dean


People also ask

Does Google Analytics track organic traffic or search traffic?

This is a bad idea because if the visitor clicks this link, Google Analytics will start to track a new session. So if someone landed on your blog from Google Search, then went to a site and signed up/converted, your traffic source report in GA will attribute that conversion to your blog, not the Organic traffic.

When does Universal Analytics stop working?

Note: In July 2023, Universal Analytics stops working. It is no longer recommended to do new implementations with Universal Analytics (GA3). Use Google Analytics 4 instead. GA4 also automatically handles subdomains.

How to implement subdomain tracking with Google Analytics and Tag Manager?

In today’s blog post, I’ll show you how to implement subdomain tracking with Google Analytics and Google Tag Manager. #1.1. Universal Analytics (analytics.js) #1.3. Google Analytics via Google Tag Manager #1.4. Check the actual cookie and its domain #2. You must use the same GA property across all subdomains #2.1. What about VERY large businesses?

Should I use Google Analytics or Google Analytics 4 for my business?

Use Google Analytics 4 instead. GA4 also automatically handles subdomains. If you are working with a business that operates on multiple subdomains (e.g. blog.business.com, support.business.com, www.business.com, etc.), you will most likely want to track website visitors with Google Analytics across all these websites.


1 Answers

Why not just set your own cookie and check against it using the opt out var?

window['ga-disable-UA-XXXX-Y'] = true;
like image 119
MisterPhilip Avatar answered Sep 19 '22 21:09

MisterPhilip