Search code examples
google-analyticsuniversal-analytics

Rollup Accounts - See where pageviews are coming from?


I've set up a rollup account for several off my other domains (Like; mydomain.com, mydomain.org, mydomain.net)

When I look at the rollup account I can see the reports but they all come from "/" instead of "mydomain.org" or "mydomain.net", is it possible to see this somehow? or track it?

Code Im running on the subsites:

<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-xxxxxxxx-1', 'auto');

//roll up account
  ga('create', 'UA-xxxxxxxx-2', {'name':'rollupProperty'}); 
  ga('send', 'pageview');
  ga('rollupProperty.send','pageview');

</script>

Solution

  • I had similar case for one of my clients, Google Analytics by default shows only page pathe (like /mypage.php instead of mydomain.com/mypage.php, mydomain.org/mypage.php, etc.).

    If you want just temporary solution, go to "Behavior -> Site Content -> All Pages" in GA reports and choose "Hostname" as secondary dimension: enter image description here

    If you want always see hostname in your GA reports, then you should create Advanced filter for rollup GA property:


    enter image description here


    This filter may allow you to extract Hostname(mydomain.org) and Ruquest URI(/mypage.php) and rewrite Request URI by combination "mydomain.org/mypage.php" in GA reports.

    Recommend you to test this approach.