How to Exclude Development Site URL's from Google Analytics

Hello fellow bubblers,

I tried to lookup how to do this in various articles, but I’m not familiar with the intricacies of including / excluding URL’s in google analytics, and got a little confused. Has anyone done this and willing to provide a brief handbook to the bubble crowd?

The problem is google analytics is currently tracking all the data to my live site, plus the development version /version-test URL’s, and I would prefer not to confuse dev site figures with live visitor data.

Anyone know what precisely to enter into the google analytics filter inputs to create a new view in analytics so that /version-test and all variants of that subdomain are excluded from the view?

1 Like

Did you add the google script manually or using the plugin? If you added it manually you can add extra javascript so that it is not active when url is “version-test”.

Another way is to add your IP in google so that it does not pick up data from your particular IP. That will include both DEV and PRODUCTION environment.

Hi @mangooly, I am using the plugin.

The best solution might be the IP exclusion actually. I didn’t think of that. Thank for sharing!

Hi @mangooly,

I’m currently trying to exclude “version-test” url from Google Analytics. But could you send a screenshot of your javascript code ?

I don’t know what extra javascript to add so that it’s not active …

Many thanks for your help,
Thomas

Hi @thomas.gounot,

You don’t need to add it in the javascript. You can add it directly in google analytics.

Admin > Filters > Add Filter

You then add the subdirectory /version-test/

Hope that helps
Regards

4 Likes

Ok! Thank you very much for your answer :slightly_smiling_face:

Best,
Thomas

Thanks for this @mangooly - really helpful! :slight_smile:

Shouldn’t the ending slash of /version-test/ be removed?

Another common approach is to use a separate Google Analytics measurement id for your “live” site and for your “version-test” site.

1 Like

I have Bubble GA plugin setup with only Production Tracking ID and running into the same issue with GA4. It’s pulling in all my testing from my IP address and skewing the results.

I followed the GA4 setup:

  1. How to identify Internal traffic: [GA4] Filter out internal traffic - Analytics Help
  2. How to exclude internal traffic: [GA4] Data filters - Analytics Help

Does anyone have any recommendations or tips on what I maybe doing wrong?

Thanks,
Ryan

The setup doesn’t seem to be instantaneously as I originally thought. I went back and checked GA4 after 15 min and now everything is being filtered correctly.

Incase anyone else has the same issue. Give it time but also create a test comparison
To test I created a comparison:
Exclude: Test data filter name
Dimension Values: Select value name you entered in GA4 setup.
Click: Apply
Review all the reports and realtime traffic.

Once tested you can go back to GA4 > Settings > Data Settings > Data Filters > and update the Current State to each filter from Testing to n and move your filters from “Testing” to “Active”. Now all the incoming matching data will be excluded from processing in GA.

I use this: Block Yourself from Analytics - Chrome Web Store, for anyone who doesn’t want to add filters to GA.

In Opera (browser I typically use) it will keep extensions in private mode, too, if we need to view using that for some reason. Works like a charm. :slight_smile:

2 Likes

Thank you for the recommendation! Works perfectly!!!

1 Like