Analytics
4.6K members online now
4.6K members online now
Learn how to set up goals and Ecommerce tracking, verify accuracy of attribution traffic sources, and discuss funnel visualization, Multi-Channel Funnels, the Goal Flow Report, and Enhanced Ecommerce
 
Guide Me
star_border
Reply

Custom dimension cross-domain ecommerce tracking

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi everyone!

 

We're seeing an issue with a custom dimension with the user scope reported once on one domain not being propagated to the next domain.

 

To simplify, we have 2 ecommerce sites with the shopping cart and one site where users complete the checkout

a.com - with the shopping cart

sub.c.com - with the shopping cart

c.com - with a checkout

 

We want to AB test how the cart looks, so we added a custom dimension with the user scope that is reported on a.com and sub.c.com, but not reported again on the checkout c.com where the ecommerce transactions are reported.

 

We set up cross domain tracking manually due to some server redirects passing clientId from a.com and sub.c.com to c.com and setting the clientId there when creating the tracker so the session can continue from one domain to the other. Technically sub.c.com doesn't need it, but we do it anyway. We added a.com to the referrals exclusion list.

 

When we run ecommerce reports it shows conversions on c.com. However, when we add our custom dimension as the second dimension in the report to see which cart variation converted more we only see conversions from users coming from sub.c.com and not from a.com. It looks like cross domain tracking is not working and GA thinks a new session starts on c.com. The custom dimension value reported once on a.com is not propagated to c.com in what supposed to be the same session.

 

I guess we can work around this by also passing our custom dimension value to c.com and report it there one more time after it was already reported on a.com, but I thought that is the whole point of cross domain tracking and user scope dimensions.

 

Thank you!

Re: Custom dimension cross-domain ecommerce tracking

Participant ✭ ✭ ✭
# 2
Participant ✭ ✭ ✭
Hi Aleksandr,

Could you give us all of your website's URLs? It helps us to figure out what might be wrong.

It seems like clientids are not being passed from a.com to c.com - it's an indication that cross-domain tracking is not working properly. You should use only one tracking ID (property) and add both top-level domains to your referral exclusion list (a.com and c.com).

Taavi

Re: Custom dimension cross-domain ecommerce tracking

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭
Taavi, thanks for the quick reply!

Here're the domains.
http://www.stixkc.com/ - with the shopping cart
http://www.phonomenal.menufy.com/ - with the shopping cart
They both navigate to checkout.menufy.com to complete checkout and you can see clientId passed in the url if you try.

dimension5 is set to 1 or 2. I have stixkc.com in the exclusion list.

I just realized that I have a different tracker on menufy.com which is not a part of the session I'm testing here, but could this be an issue? I actually want to track users coming from menufy.com too as the first step. From there they can go to stixkc.com and finally to checkout.menufy.com. I'm going to switch menufy.com to the same tracker as all the other sites.

Do I need to add all of the above sites to the exclusion list?

Thanks!
Alex

Re: Custom dimension cross-domain ecommerce tracking

[ Edited ]
Participant ✭ ✭ ✭
# 4
Participant ✭ ✭ ✭

Hi Alex,

 

I checked the cross-domain tracking implementation. Unfortunately, it's not implemented properly right now. Client ID is not being passed when I go from stixkc.com to phonomenal.menufy.com.

 

1. stixkc.com (cid = clientid)

 

cid1.png

 

2. stixkc.com -> checkout.menufy.com

 

cid2.png

 

How to fix it?

 

First of all, you don't need custom dimensions to set this up. You've put a lot of effort into this, but actually it easier than you think. Smiley Happy You need to set up one property in your Analytics account. Use the same tracking code snippet and tracking ID from that property for all of your domains (you're already doing it). Let's take this property for example: UA-64332555-1

 

Add this code to stixkc.com:

 

  ga('create', 'UA-64332555-1', 'auto', {'allowLinker': true});

  ga('require', 'linker');

  ga('linker:autoLink', ['menufy.com'] );

 

Add this code to menufy.com:

 

  ga('create', 'UA-64332555-1', 'auto', {'allowLinker': true});

  ga('require', 'linker');

  ga('linker:autoLink', ['stixkc.com'] );

 

Add both domains (stixkc.com and menufy.com) to referral exclusion list.

 

That's it. Smiley Happy

 

Here you can read more about it: https://support.google.com/analytics/answer/1034342?hl=en

 

One more tip: I highly recommend you updating your site (stixkc.com) to HTTPS because during HTTP to HTTPS redirect the referrer is not passed because of security reasons by default.

 

Hope this helps. Let us know how it goes. If you have any further questions, just let us know.

 

Taavi

Custom dimension cross-domain ecommerce tracking

Visitor ✭ ✭ ✭
# 5
Visitor ✭ ✭ ✭

Taavi, I figured it out eventually. What I was doing was correct and I cannot use the linker plugin because of the server side redirects.

The problem I had was a tiny mistake (as always). I forgot quotation marks when setting the client Id on the tracker. It was interpreted as a double number instead of the string and the client id wasn't set correctly.

 

ga('create', 'UA-...', 'auto', { 'clientId': 346194219.1476231419 });

 

Thank you for your help!