Mobile app version of vmapp.org
Login or Join
Ravi8258870

: 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:

@Ravi8258870

Posted in: #GoogleAnalytics #Subdomain

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.

10% popularity Vote Up Vote Down


Login to follow query

More posts by @Ravi8258870

0 Comments

Sorted by latest first Latest Oldest Best

Back to top | Use Dark Theme