I've got a site that has many domains and subdomains. They all go to the same pages and do the same stuff. The only thing that changes from domain to domain is the images and colors of the site. So I wanna track the users activity and started using google analytics. I changed the google script to this:
<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-XXXXX-X', 'auto', {'allowLinker': true});
ga('require', 'linker');
ga('linker:autoLink', ['domain2.com'] );
ga('send', 'pageview');
</script>
But this only gives me the data from all activities in the browser no matter from which domain it came. I wanna know if it's possible to also separate which domain had more hits and stuff like that. Is it possible? Is there any other tool where this is possible?
Thanks :)
Sounds like you are tracking all (and any) of your domains with that code snippet you provided. Some best practices are to
Include
filter applied) and alsoPrepend hostname
filter so you can see which domain traffic comes in from.Edit: Here's a screenshot of how you would include a filter for a specific domain: