Reputation: 115
I need solution to set up Google Analytics4 for my website with multiple GTM environments (Dev, Prod).
Earlier for Universal Analytics we have solved this by setting up Lookup Table & tracking IDs (for multiple environments)
Configured till now:
we can see both Dev & Prod data in GA reports. Which messing entire reports. So we need to forward prod data to GA Prod property n Dev data Dev property.
Upvotes: 6
Views: 2043
Reputation: 344
You can create separate properties for the PROD and DEV data.
Create a PROD property and setup a data stream for it.
Create a DEV property and setup a data stream for it.
Create a lookup table which outputs the stream id for PROD/DEV depending on the env.
Add the lookup variable to the config tag under "Measurement ID"
The PROD data will then go into the PROD property and the DEV into the DEV
Upvotes: 1