Cross Domain Tracking not working from our site to our shopify checkout

Cara_Jo
Shopify Partner
2 0 3

We are running into an issue where our Google Analytics isn't tracking sessions from our .com site to the Shopify checkout flow.

Technology we are using: 

  • React Site using Gatsby
  • Buy Buttons (not SDK, and not API - generic buy buttons) 
  • Universal Analytics 

Flow we are expecting to track with the same session. 

  1. User comes to the site after clicking on a link in an email (for example rachio.com/?utm_source=shopify_forum) 
    1. Source is: shopify_forum
  2. The user browses around the site - and adds an item to cart. 
    1. Source is: shopify_forum
  3. User clicks the 'checkout' button in the drawer cart
    1. Source is: shopify_forum
  4. User is taken to the checkout flow and enters their shipping and billing information.
    1. Source is: shopify_forum

Current Flow

  1. User comes to the site after clicking on a link in an email (for example rachio.com/?utm_source=shopify_forum) 
    1. Source is: shopify_forum
  2. The user browses around the site - and adds an item to cart. 
    1. Source is: shopify_forum
  3. User clicks the 'checkout' button in the drawer cart
    1. Source is: direct
  4. User is taken to the checkout flow and enters their shipping and billing information.
    1. Source is: direct

As you can see, on step 3, the source of `shopify_forum` drops off and it starts a new session. I know this is due to the `clientId` from GA changing. 

I need help getting these actions counted as one session that all rolls up to the same source `shopify_forums`. 

Things I have tried: 

If anyone out there has insight on how to make this work, please share it! 

 

Manager of Web things at Rachio.com
Replies 7 (7)
Feddo
New Member
3 0 0

Hi Cara, did you find a solution for this? I have the exact same problem with our store were we try to connect the buy button visitors (from a subdomain) to the main store. Google keeps seeing them as new visitors from 'direct' when they enter the checkout funnel. Im hoping that you did find the solution!

Cara_Jo
Shopify Partner
2 0 3

Hi Feddo,

I did find a solution - it's a little hacky, but it works. Shopify and Google Analytics were of no help to me when I reached out to them, but we solved it with some Javascript.

Basically here's what we do:
When a user visits our site with UTM parameters in the URL, we grab the values of them and store them in a cookie. That cookie stays with them throughout the site and expires after 24h. The user can add items to their cart and once they click the 'checkout' button, we grab the values of the cookie (UTM params) and then pop them onto the end of the Shopify URL. 

 

It seems to be working well for us! 

 

If you need any more help, let me know, I'm happy to walk you through the set up. 

Manager of Web things at Rachio.com
BackpackDigital
New Member
1 0 0

Hi Caro_Jo,

 

Is there any chance we can chat through email so I can understand how you fixed this?

I have the same issue with a client of mine.

 

Appreciate any help you can give!

Josh_Uebergang
Shopify Expert
965 40 248

A potential problem with this method is the utm parameters won't update if the visitor jumps around and returns to the website via another traffic source. Happens all the time. Or maybe you do update the cookie? But, I suppose it's a trade-off. This is a known issue with Shopify's GA for half a year.

Run Google Shopping ads? Get the free definitive guide to Google Shopping for Shopify (no optin required): https://www.digitaldarts.com.au/google-shopping
cmorales
Explorer
85 3 10

Recently GA Tracker Code is still working here in Shopify. We were test it 2 week ago.

Feddo
New Member
3 0 0

Hi Cara, that sounds like a great solution! Would you mind sharing the javascript? I would love to test it out. Thanks!

Feddo
New Member
3 0 0

You can also mail me on feddodroog@reroll.nl