Is there a way to have different GA4 data sources ...
# ask-questions
j
Is there a way to have different GA4 data sources for different environments? Production environment is tied to production GA4, development is tied to a dev GA4 setup?
f
Yes, you can add multiple data sources
what’s the use case for having a data source for development?
a
You could set it with environment variables, or if you use GTM just change GA4 tag with a variable based on hostname.
j
@fresh-football-47124 To keep dev and production separate. Unless there is a different way. We have two separate instances of GA4, one for production and one for development.
a
I want a similar setup in my org Erik. just to keep everything 100% separate. What I’m stuck with for now is separate GA audiences, based on hostname = rules.
f
usually most people don’t bother tracking data from development
j
While that's true, it does help us test or create new ways of tracking before it hits production.