Let’s say you’re launching a significant update to a website. A lot is changing: the theme, lots of URLs, maybe the CMS or backend, and so forth. And the team creating the website is working from various IP addresses on the development site. What’s the best way to handle the transition with Analytics?
Lately (after having a website launch without Analytics earlier this year) I’ve been handling this in a very particular way, and I’ve grown to really like it. Basically, I’m using hostnames (dev.domain.com, www.domain.com, etc.) in Google Tag Manager to automatically split traffic to different Analytics properties. I’m doing this by using a “lookup table” for my Analytics IDs (instead of using a “constant” variable).