CardinalPath / gas

Google Analytics on Steroids. A Google Analytics implementation with more power features.
Other
593 stars 78 forks source link

Cross domain - visits but 0 pageviews, 0 pages/visit, 0% bounce rate #46

Closed KarinaLibrary closed 10 years ago

KarinaLibrary commented 11 years ago

Hi -

Using the following GAS script:

var _gas = _gas || [];
_gas.push(['original._setAccount', 'UA-######-#']); //keeping tracking for historical account
_gas.push(['original._setDomainName', '.domain1.org']);
_gas.push(['original._trackPageview']);
_gas.push(['_setAccount', 'UA-######-#']); 
_gas.push(['_setAllowLinker', true]);
_gas.push(['_setAllowAnchor', true]);
_gas.push(['_setDomainName', '.domain1.org']);
_gas.push(['_setDomainName', '.domain2.com']);
_gas.push(['_setDomainName', '.domain3.com']);
_gas.push(['_setDomainName', '.domain4.com']);
_gas.push(['_gasMultiDomain', 'click']);
_gas.push(['_trackPageview']);
_gas.push(['_gasTrackForms']);
_gas.push(['_gasTrackOutboundLinks']);
_gas.push(['_gasTrackMaxScroll']);
_gas.push(['_gasTrackDownloads']);
_gas.push(['_gasTrackYoutube', {force: true}]);
_gas.push(['_gasTrackVimeo', {force: true}]);

(function() {
var ga = document.createElement('script');
ga.type = 'text/javascript';
ga.async = true;
ga.src = '//cdnjs.cloudflare.com/ajax/libs/gas/1.10.1/gas.min.js';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(ga, s);
})();

On all the cross-tracked domains we're showing visitors but 0 page views and 0% bounces everywhere. Screenshot:

screen shot 2013-06-05 at 4 38 05 pm

phms commented 11 years ago

Could you try it this way?

var _gas = _gas || [];
_gas.push(['original._setAccount', 'UA-######-#']); //keeping tracking for historical account
_gas.push(['original._setDomainName', '.domain1.org']);
_gas.push(['original._trackPageview']);

_gas.push(['new._setAccount', 'UA-######-#']);
_gas.push(['new._setAllowLinker', true]);
_gas.push(['new._setAllowAnchor', true]);
_gas.push(['new._setDomainName', '.domain1.org']);
_gas.push(['new._setDomainName', '.domain2.com']);
_gas.push(['new._setDomainName', '.domain3.com']);
_gas.push(['new._setDomainName', '.domain4.com']);
_gas.push(['new._gasMultiDomain', 'click']);
_gas.push(['new._trackPageview']);

_gas.push(['_gasTrackForms']);
_gas.push(['_gasTrackOutboundLinks']);
_gas.push(['_gasTrackMaxScroll']);
_gas.push(['_gasTrackDownloads']);
_gas.push(['_gasTrackYoutube', {force: true}]);
_gas.push(['_gasTrackVimeo', {force: true}]);

(function() {
var ga = document.createElement('script');
ga.type = 'text/javascript';
ga.async = true;
ga.src = '//cdnjs.cloudflare.com/ajax/libs/gas/1.10.1/gas.min.js';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(ga, s);
})();
KarinaLibrary commented 11 years ago

Thanks Fabio - so add a new._ ; I thought maybe that separating cookies like that might not be ideal because for instance the way other actions on the default cookies store could influence analytics... I can try this though...

tomfuertes commented 10 years ago

Hope it worked! Closing this as it's not an issue with core, but more a specific support case. Feel free to keep updating if you have problems.