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

Analytics
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
star_border
Reply

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: http://sub.domain.com/wxyz/servlets/?eventId=#######&presenter=UNIQUE_ID&venue=&event= and http://sub.domain.com/wxyz/servlets/EventSearch?presenter=UNIQUE_ID

 

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? 

 

Thanks!

 

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:

https://support.google.com/analytics/answer/6163791?hl=en

 

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

http://blog.littledata.io/2016/03/09/using-lookup-table-variable-in-google-tag-manager/

 

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