revolunet / angular-google-analytics

Google Analytics tracking for your AngularJS apps
MIT License
652 stars 179 forks source link

Issue with cross-domain tracking #205

Open sarates opened 7 years ago

sarates commented 7 years ago

during usage cross-domain linking on some laptops cid is incorrect. For example:

dl: https://xxxxxx.xxxx.com?email=test@test.test&_ga=2.13376453669.21418884567.1494434567-1083593468.1486999114

and

cid :10835945668.1484569125

so there is a difference between cid on two pages.

Settings on parent site:

ga('create', 'XXXXXXXXXXX', 'auto', {'allowLinker': true});
ga('require', 'linker');
ga('linker:autoLink', ['YYYY.com'] );
ga('send', 'pageview');

And settings on YYYY.com

AnalyticsProvider.setAccount({
            tracker: 'XXXXXXXXXXX',
            name: "tracker1",
            fields: {
                cookieDomain: 'YYYY.com',
                cookieName: '_ga',
                cookieExpires: 63072000
            },
            crossDomainLinker: true,
            crossLinkDomains: ['perent-site.com'],
            displayFeatures: true,
            enhancedLinkAttribution: true,
            select: function (args) {
                return true;
            },
            set: {
                forceSSL: true
            },
            trackEvent: true,
            trackEcommerce: true
        });

But in 90% all is correct. This issue is reproducing on some laptops when you open parent site in incognito mode. Help pls.