Stop Google Analytics tracking my test app

Hey. I have google analytics tracking visits to my site but it is showing view from my test/dev version as well as the live version. the way i have it set up is I have google analytics tracking ID that i’ve pasted into the plugin page of my bubble app.

The google analytics data is useless now that it is mostly showing me previewing my own dev version of the app every 10 minutes. What do i need to do to stop google analytics counting these?

There are a couple of ways to do it. My preference is to use a separate GA measurement Id for test vs live. ie in the Plugin settings. Clean and easy and very “Bubblish” :slight_smile:

It’s possible to set up “view filters” in GA - processing rules to discard events from requests with a URL path that matches “version-test”
GA4: https://support.google.com/analytics/answer/10108813?hl=en
UA: https://support.google.com/analytics/answer/1033162?hl=en#zippy=%2Cin-this-article
But this is much more effort :slight_smile:

1 Like

Yeah, and i’m wanting to know how to do that. I’m not a technical person by the way. All I know is that GA gives you an ID and i’ve just pasted that into the plugin page of my app but clearing that is tracking both live and test version. Can you tell me how to not have it in the test version? For example, do i need to add the ID to the plugin page then deploy live then remove it from the plugin page after each time i deploy live? see, I don’t know. By the way, I don’t need an ID for the test App. I don’t know why anyone would need that.

No problem :slight_smile:

  1. Setup a 2nd GA Measurement id in GA for your your Bubble app. Call it something like “dev” (meaning the version-test Bubble app) and so the other one is “live” (you can also put the version-test in the path of the URL that you are registering the dev measurement id.)
  2. In whatever GA plugin you are using there will be options for “dev” values (see image) - put the “dev” GA measurement id in the Dev plugin section.

Bubble will dynamically put the correct GA measurement id (dev or test) in the dev or test Bubble App version so your events for dev and live will go to different measurement ids.

Sure, you may not ever use the GA dev statistics - but you are using it to conveniently separate your dev and live GA events. :slight_smile:

1 Like

But i don’t have anything in the dev. one so i don’t know why it is tracking it.

That’s just the way Bubble behaves :slight_smile: If you leave the dev value empty it takes the value you put in the “live” version. You need to over-write it for the dev version.

Make sense?

2 Likes

Everything is clear now.

Well, there is still the matter of my Google analytics account data being a blend of dev and live version visits…

1 Like