Mobile app version of vmapp.org
Login or Join
Dunderdale272

: If you mean a property to track "all domains" as 1 UA number (property), then filtering by domain, then yes. You can do it by making a custom property then appending a custom linker onto

@Dunderdale272

If you mean a property to track "all domains" as 1 UA number (property), then filtering by domain, then yes. You can do it by making a custom property then appending a custom linker onto the individual sites tracking script(s). The custom code part fires requests through a secondary "router" which then pushes the combined events into GA. So each script would actually have 2 UA numbers -- its own property UA and the linker UA for the shared "all domains" router->property.

And yes, you should be able to use the API to pull the pool data, just create filters per domain in the requests. It still depends on how specific you need the data, but thats the benefit of having each domain on its own property too.

Example of all domains router script:

<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-00000000-00', 'auto', {'allowLinker': true});
ga('require', 'linker');
ga('linker:autoLink', ['mydomain.com, otherdomain1.com, otherdomain2.com, otherdomain3.com, otherdomain4.com, otherdomain5.com, otherdomain6.com, otherdomain7.com'] );

ga('send', 'pageview');

</script>


Example of domain specific script:

<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-11111111-11', 'auto');
ga('send', 'pageview');

ga('create', 'UA-00000000-00', 'auto', {'name': 'appTracker', 'allowLinker': true});
ga('appTracker.require', 'linker');
ga('appTracker.linker:autoLink', ['analytics.mydomain.com'] );
ga('appTracker.send', 'pageview');
</script>


Here is a guide to get it set up. Pardon the forum drop, I will put it on a my site at some point: forum.opencart.com/viewtopic.php?f=24&t=131907
And here are the GA filters to see domains within a shared property: support.google.com/analytics/answer/1012243?hl=en

10% popularity Vote Up Vote Down


Login to follow query

More posts by @Dunderdale272

0 Comments

Sorted by latest first Latest Oldest Best

Back to top | Use Dark Theme