Google Analytics Cross domain tracking

Solved
artursm
Tourist
7 0 1

Good day!

 

We have two separate stores with shopify - example.com & example.dk. They are just 2 different language versions for the same product. We need to get all the data in Google Analytics under one view, but I'm not sure how to approach correctly Cross Domain Tracking with shopify.

 

Could please someone tell me what would be the best way to set up cross domain tracking? Is it possible to do it with GTM?

 

Thanks in advance and cheers!

Accepted Solutions (2)
Sara32
Shopify Partner
47 4 16

This is an accepted solution.

No, it'll just combine the sessions from both website into the one GA account.  You will be able to filter/segment the data in reports to see the individual sites in GA, but the main reports will show total data for both sites.

 

This is the best place to look: https://support.google.com/analytics/answer/1034342?hl=en

 

It gives you all the info about how to install/edit the code on each website and some info at the end about setting up your reports.

 

 

Specialising in Google Shopping for Shopify stores.

View solution in original post

Josh_Uebergang
Shopify Expert
1000 42 261

This is an accepted solution.

Sara's solution is partly correct. What else you need to do depends on how users are taken between the stores. You have to consider the Google Analytics cookie. For it to pass user information between domains, the URL must be decorated with the _ga parameter. See my Shopify Google Analytics guide to learn how. Users can been redirected between stores in many different ways. Each way has to be accounted for. The easiest one to handle is a standard html link as Google Analytics has a plugin to auto-handle this for you. If you use a geo-location app in Shopify handle that prompts a user with a popup to be taken to a particular store, you'll probably have to make a feature request as they don't handle this correctly.

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

View solution in original post

Replies 8 (8)
Sara32
Shopify Partner
47 4 16

Add the same GA code to both websites and have them both in the same GA account.  Add both sites in the referral exclusion list in that view.  

Discovered this the hard way after spending a fortune with an analytics expert on Upwork.

 

(FYI if you're planning on using google Ads and will have two separate ad accounts, set them up under an MCC account and use MCC level conversion tracking to save a load of hassle tracking conversions if people switch from one site to the other).

 

Hope that helps.

Sara

 

Specialising in Google Shopping for Shopify stores.
artursm
Tourist
7 0 1

@Sara32 wrote:

Add the same GA code to both websites and have them both in the same GA account.  Add both sites in the referral exclusion list in that view.  

Discovered this the hard way after spending a fortune with an analytics expert on Upwork.

 

(FYI if you're planning on using google Ads and will have two separate ad accounts, set them up under an MCC account and use MCC level conversion tracking to save a load of hassle tracking conversions if people switch from one site to the other).

 

Hope that helps.

Sara

 



Just wondering - if I use same GA code on 2 sites, won't it inflate sessions?

Sara32
Shopify Partner
47 4 16

This is an accepted solution.

No, it'll just combine the sessions from both website into the one GA account.  You will be able to filter/segment the data in reports to see the individual sites in GA, but the main reports will show total data for both sites.

 

This is the best place to look: https://support.google.com/analytics/answer/1034342?hl=en

 

It gives you all the info about how to install/edit the code on each website and some info at the end about setting up your reports.

 

 

Specialising in Google Shopping for Shopify stores.
artursm
Tourist
7 0 1

@Sara32 wrote:

No, it'll just combine the sessions from both website into the one GA account.  You will be able to filter/segment the data in reports to see the individual sites in GA, but the main reports will show total data for both sites.

 

This is the best place to look: https://support.google.com/analytics/answer/1034342?hl=en

 

It gives you all the info about how to install/edit the code on each website and some info at the end about setting up your reports.

 

 


Hi Sara!

 

I have tried this but somewhat without success. Added to both sites same GA code, added both .dk and .com sites to Refferal Exclusion Lists, but when I navigate from one site to another, in real time report I appear as 2 different users. 😞 

jackyle
Explorer
71 1 8

You use a gmail account to create GA code, then you copy the code and put it on both of your websites, this will help you track both websites at the same time.

Josh_Uebergang
Shopify Expert
1000 42 261

This is an accepted solution.

Sara's solution is partly correct. What else you need to do depends on how users are taken between the stores. You have to consider the Google Analytics cookie. For it to pass user information between domains, the URL must be decorated with the _ga parameter. See my Shopify Google Analytics guide to learn how. Users can been redirected between stores in many different ways. Each way has to be accounted for. The easiest one to handle is a standard html link as Google Analytics has a plugin to auto-handle this for you. If you use a geo-location app in Shopify handle that prompts a user with a popup to be taken to a particular store, you'll probably have to make a feature request as they don't handle this correctly.

Run Google Shopping ads? Get the free definitive guide to Google Shopping for Shopify (no optin required): https://www.digitaldarts.com.au/google-shopping
essdee
Visitor
1 0 0

Hello

I'm trying to set up cross-domain tracking and I ran into this exact problem. We currently use a pop-up to handle redirects and it's stripping the _gl parameter for GA4. What kind of feature request has to be made in order to fix this? 

 

Thanks! 

Darius90
Shopify Partner
31 0 6

@Sara32  @Josh_Uebergang What about liquid solution to give different GA snippet depend on domain?

For example: 

if canonical_url contains ".com"

--> this google snippet

elsif canonical_url contains ".co.uk"

--> another google snippet for .co.uk

...