: Google Analytics - Separate Views For Subdomains Aren't Returning Data I've setup new views in Google Analytics last week, but I'm not getting any data from them at all. We have our main site:
I've setup new views in Google Analytics last week, but I'm not getting any data from them at all.
We have our main site: example.com which is using the old version of GA:
var _gaq = _gaq || [];
_gaq.push(
['_setAccount', 'UA-XXXXXX-X'],
['_setDomainName', 'www.example.com'],
['_trackPageview'],
['hq._setAccount', 'UA-XXXXXX-X'],
['hq._setDomainName', 'www.example.com'],
['hq._trackPageview']
);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
We have a subdomain at store.example.com and the platform we're using (Virto) considers store.example.com/en-us/blue-widgets and store.example.com/en-us/red-widgets as two separate websites. It lets us pick which one of those directories is default, so when you enter store.example.com into your address bar, you're redirected to store.example.com/en-us/blue-widgets. The store subdomain has the new version of GA:
(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-XXXXXX-X', 'auto', { 'allowLinker': true });
// Load the plugin.
ga('require', 'linker');
// Define which domains to autoLink.
ga('linker:autoLink', ['store.example.com']);
ga('send', 'pageview');
```
So here is what I did for a new view just for the BLUE WIDGET Site Data:
Under New VIEW, Website's URL: I picked "HTTPS://" and then entered "store.example.com/en-us/blue-widgets".
And then I created a Filter on this view for traffic through BLUE WIDGETS only:
"INCLUDE ONLY", "TRAFFIC TO THE HOSTNAME", "THAT CONTAIN", HOSTNAME: store.example.com/en-us/blue-widgets
I did that for both Blue and Red Widget sites, but I'm not getting data back on either view. I'm obviously doing something wrong. I hope all that makes sense and someone can see where the problem is. Please let me know if there's more info I can provide.
More posts by @Ravi8258870
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.