简体   繁体   中英

Domain tracking in Google Analytics

I've googled for this and also searched Stackoverflow but haven't been able to identify an answer to these specific questions:

  1. I have 2-3 domains that point to the same page using virtualhosts. Is it possible for me to determine which domain was accessed to visit that page in Google Analytics? Currently, I'm using the code below but I'm unable to figure out where to see this data (if the implementation is correct)
  2. For a lot of my traffic, I see the referral domain of the user. Is it possible to determine the full path which referred the user. Additionally, can I also determine the domain that the user was referred to (from question 1 above)?

Thanks in advance for your help.

Current implementation:

<script>

ga('create', 'UA-pubid');
ga('set', 'domainName', 'currentdomain.com'); // determined server side/using JS

var dimensionValue = 'currentdomain.com'; // determined server side/using JS
ga('set', 'dimension1', dimensionValue);

ga('require', 'linker');
ga('linker:autoLink', [window.location.href]);
ga('send', 'pageview');

</script>

You do not need a custom dimension since Google already captures the name in the "hostname" data field.

You can access this (just as you can access custom dimensions) by either selecting it as secondary dimension in a report table, or by creating a custom report.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM