AdWords is now Google Ads. Our new name reflects the full range of advertising options we offer across Search, Display, YouTube, and more. Learn more

2.6K members online now
2.6K members online now
Dive into multiple domain (Cross/Sub) tracking, implementing Ecommerce and Enhanced Ecommerce, setting up Event tracking, and Universal Analytics code.
Guide Me

Setup Google Analytics with a URL that has a query

[ Edited ]
Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi all, 


Basically what the subject is saying. I need to create a Google Analytics account/ID for a URL (for a client) that includes a unique query string. For example, the URL is structured like this: and


Basically everything after the sub-directories is unique and specific to the client but everything before is generic and applies across the site. Is there a workaround or a solution? 




1 Expert replyverified_user

Setup Google Analytics with a URL that has a query

Top Contributor
# 2
Top Contributor

Hi Cindy,


You don't need to include the query string in the settings anywhere, just create a property for each presenter and add the tracking code conditionally to the URLs with the unique ID. The easiest way would be using Google Tag Manager. Set up an universal analytics tracking tag and use a lookup table variable that will insert the UA-ID based on the presenter unique id. You can get the presenter ID from the URL using an URL variable, query type. Please see the link below about setting up Google Analytics using Google Tag Manager:


In the article, gaProperty would be the lookup table variable, please read the part "Multiple Google Analytics properties":


Hope this helps, let me know if you have questions

Arnold Majlath, Google Analytics Top Contributor
Was my response helpful? If yes, please accept it as solution.
Circle Me On Google+ | Visit me @ Redfly Digital