Google Optimize, Shopify and Google Analytics

Shopify Partner
16 0 9


I'm trying to find a neat way to install Google Optimise but I can't seem to find a solution.


Currently we have Google Analytics installed via the Shopify admin section.


I've tried to install Google Optimise code in the "additional scripts" bit but it never picks it up, I believe because Google Analytics and Google Optimise are using different libraries (e.g. gtag.js vs ga.js). 


So the only solution as far as I can see is to remove Google Analytics from the Shopify admin implementation, and re-install it manually via Google Tag Manager or straight into the store code.


I'm concerned about doing this though, as I believe this will mean I loose all eCommerce tracking. Is this the case? Or will Shopify still pass data through to GA without needing significant customisation?


If anyone has found a easy solution to installing Google Optimise please let me know!

Shopify Setup and optimisation consultant
4 0 1

Can anyone answer to this or is the answer just to take away the shopify integration through admin and use google tag manager to implement google analytics? 

4 0 1

I am hoping that if we had to hardcode analytics into the template, we'd still be able to get most of information: 

  • we'd actually have to set up the datalayer to send the additional information that is inside the cart and keep info like when they signed up for an account etc. 
    • i was reading up that we'd have to implement cross domain tracking since shopify's integration does it automatically for us but analytics wouldn't do that by default. 
  • Not sure how to implement recognizing the product category events to be honest and separating that out so we can view what's popular. Is it just as simple as sending an event trigger whenever someone lands on page that matches category name?
  • I see in my dashboard: Audience -> Affinity Categories & In-Market Segments -- that I was never able to access before. 

Is there more info on what information exactly enhanced e-commerce captures & sends to analytics? I see in my dashboard: Audience -> Affinity Categories -> and someone interesting results that I've never seen before which is great. Contemplating whether it's worth the trade off if I can't immediately replace all the features. 


I also read somewhere (could be outdated) that w/o the dashboard analytic sync, many of the features are limited to Shopify Plus. 


New Member
1 0 0

Hi Adam,

How exactly did you implemented Optimize?

I have tried it on one of our development stores but it seemed working when I set like this.

4 0 0

I'm struggling with the exact same thing.

I've implemented the Optimize container through the Shopify admin by passing this as additional scripts to the GA tag:

Screenshot 2019-11-09 at 10.30.34.png

However, that causes page flickering, making the user experience horrible.