rxz99 / analytics-issues

Automatically exported from code.google.com/p/analytics-issues
0 stars 0 forks source link

Cross domain tracking (universal analytic) is not working #683

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago

Name of affected component: Cross domain tracking (universal analytic) is not 
working

Issue summary:
Hi all!

We tried to implement auto link cross domain but it doesn't seems to work. Here 
is the case:

We have 2 different domains:
1. source.com
2. destination.com

When user visits source.com and click on Submit button, he is automatically 
redirected to the destination.com (the redirection is on the server side and 
not the client).
We want to have the ability to track the user action on both domains and treat 
it as the same user.

We have the following code on the source.com domain:

  ga('create', 'UA-XXXXXX-X', 'auto', {'allowLinker': true});  
  ga('create', 'UA-XXXXXX-X', {'name': 'newTracker'});

  ga('newTracker.send', 'pageview');
  ga('send', 'pageview');

  ga('require', 'linker');
  ga('linker:autoLink', ['destination.com'], true, true);

And this code on the destination.com domain:

  ga('create', 'UA-XXXXXX-X', 'auto', {
              'allowLinker': true
          });

          ga('send', 'pageview');

This code is not working. we tried to use the same UA id for both but the 
client id seems to change between the domains and therefore I move from 
source.com to destination.com I see in analytics 2 different users.

We also tried to pass ourselves the _ga parameter but it also doesn't seems to 
work

Can anyone please advice? We can't understand what we are doing wrong.
It can be great if you can show an example code and not just reference (:

Thanks!!
Stav

Original issue reported on code.google.com by S...@tenengroup.com on 30 Jun 2015 at 2:26

GoogleCodeExporter commented 8 years ago
For questions and help use the analytics.js forum.
https://groups.google.com/forum/?fromgroups#!forum/google-analytics-analyticsjs

This issue tracker is for bugs and feature requests.

Original comment by pfrise...@google.com on 30 Jun 2015 at 4:39