Search code examples
tagscross-domaingoogle-tag-manageruniversal-analyticsdomain-name

How to capture domain name and record In Google Universal Analytics via Tag Manager


I am implementing Google Tag Manager. We are using Universal Analytics. We manage close to 100 sites and apps.

I wish to compress and consolidate our analytics into a single tracking code and profile. But in order to do this I need analytics to capture and record the domain name.

How do I set a GTM tag to capture the domain name in Universal Analytics.

I've Googled this and saw some Google help on cross browser capture and allowLinker, etc. but I am not sure that is the way to achieve what I am after.

Thanks.

Question Clarified

For purposes of an example, consider this as part of our portfolio (all sites use same GA Tracking Code and GTM Container ID):

  • Site 1 (of approx. 100) = abc.com | UA-98765432-1 | GTM-A1B2C3
  • Site 2 (of approx. 100) = xyz.com | UA-98765432-1 | GTM-A1B2C3

So when I go to our (Google) Universal Analytics dashboard and profile reports for UA-98765432-1 I would like to see all report data contain its corresponding domain name -- abc.com and/or xzy.com

To me, on the surface, it seems like that is an easy thing to capture and see.


Solution

  • You could add a filter to prepend the hostname to all your hits:

    enter image description here

    The result becomes http://www.hostname.com/request_uri.