AdWords is now Google Ads. Our new name reflects the full range of advertising options we offer across Search, Display, YouTube, and more. Learn more

Analytics
2.6K members online now
2.6K members online now
Dive into multiple domain (Cross/Sub) tracking, implementing Ecommerce and Enhanced Ecommerce, setting up Event tracking, and Universal Analytics code.
 
Guide Me
star_border
Reply

Cross Domain Tracking always create new session

[ Edited ]
Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi experts,

 

I have a hard time about 2 week on implement cross domain tracking, i view no fewer than 20 articles or tutorial, but still can't get this works.

I using Shopify shopping cart which will cross 2 domain, no1.asana.com.hk and checkout.shopify.com

 

The flow is quite simple.

 

Step 1. Customer land product page with UTM from Facebook AD -
https://no1.asana.com.hk/products/150ml-6-no-1-60-1?utm_source=facebook&utm_medium=click-to-website-...

 

Step 2. Add to Cart, it will POST form and go to url, until this page, all UTM campaign, medium are retain.
https://no1.asana.com.hk/cart

 

Step 3. Click the right corner purple checkout button, the page redirect to another domain, the GA client id change, all UTM information is lost.

https://checkout.shopify.com/13730289/checkouts/3bf1f3b7dc691791dc472bb318b19476 

 

  I didn't append the client id to _ga since some article said using auto link domain doesn't need that.

The following is the GTM setting screenshot, GA related setting and Google Tag Assistant Recording, any information i can provide if needs. 

Thank you!

 

GTM

Image 004.pngGTM Setting

 Auto Link Domain Variable

Image 009.png

 

 

 Referral Exclusion List

Image 010.pngReferral Exclusion List

 

 Step 2

Image 012.png

 

 Step 3

Image 013.png

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Marked as Best Answer.
Solution
Accepted by topic author Tat Ming C
October 2016

Re: Cross Domain Tracking always create new session

Follower ✭ ✭ ☆
# 2
Follower ✭ ✭ ☆

Hi Tat Ming C

 

I checked your site. The destination URL of form checkout button has a redirect.

Please try the following code.

 

jQuery('input[name="checkout"]').on('click', function(){
  var tracker = ga.getAll()[0];
  var destination = jQuery(this).closest('form').attr('action').split('#')[0];
  jQuery(this).closest('form').attr({
    'action': destination + '#' + tracker.get('linkerParam')
  });
});


Thanks, Ryota.

View solution in original post

Marked as Best Answer.
Solution
Accepted by topic author Tat Ming C
October 2016

Re: Cross Domain Tracking always create new session

Follower ✭ ✭ ☆
# 2
Follower ✭ ✭ ☆

Hi Tat Ming C

 

I checked your site. The destination URL of form checkout button has a redirect.

Please try the following code.

 

jQuery('input[name="checkout"]').on('click', function(){
  var tracker = ga.getAll()[0];
  var destination = jQuery(this).closest('form').attr('action').split('#')[0];
  jQuery(this).closest('form').attr({
    'action': destination + '#' + tracker.get('linkerParam')
  });
});


Thanks, Ryota.

Cross Domain Tracking always create new session

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

Hi Yamada,

 

I using you code to append client_id to url and waiting customer buy something and see the result.

I will come back and report how is work.

Thank you very much.

I am extremely thankful to you!!

 

 

 

Cross Domain Tracking always create new session

Visitor ✭ ✭ ✭
# 4
Visitor ✭ ✭ ✭

Hi Yamada,

 

I have check GA today, it works like a charm!

Thanks you very much!

I thought most article search on Google emphasize the Auto Link Domain and said decorate form and link is optional and only need if using Classic GA or AutoLinkDomain is not available.  

So i would like to know the root cause, 

 

1. Add product to cart (ACTION: /cart)

2. The cart redirect internally to (/cart/add)

Is the redirection recreate the cookie?