Using a different GA account based on query string parameter
In my web application, clients are provided with unique URLs using a query string parameter:
http://www.mywebapp.com/ <--- Default demo
http://www.mywebapp.com/?appId=aR3allyL0ngValu3G03sH3r3 <--- client A
http://www.mywebapp.com/?appId=3737d737d73hdu37838du <--- client C
Each client will provide their own Google Analytics tracking ID.
- The "Default URL" in the Property Settings does not allow query parameters. Will this cause issues since clients are differentiated based on a query parameter? My default demo ID won't match the client's ID.
- When I create a tracker, should I naming it? ga('create', 'UA-XXXXX-Y', 'auto', 'clientA')
Re: Using a different GA account based on query string parameter
The "Default URL" value does not impact the visitor's experience on your site. I believe it's related more to reporting an other things that aren't part of data collection itself.
Regarding the named tracker, you would only need to do this if you have multiple tracking objects on the page (ie. say you were were collecting data into two or more different GA properties). That's really the only use for naming trackers.
Was my response helpful? If yes, please mark it as the ‘Best Answer.’ Learn how here.
Find me on: Google+ | LinkedIn