Free Sign up
Member Login

How To Install Google Optimize on a Shopify Site


Google Optimize is a powerful, and free, A/B testing and optimization tool.In this step-by-step tutorial, you’ll be walked through the exact process you need to install Google Optimize on a standard Shopify website site.  Note, Shopify Plus is not covered in this tutorial. You’ll learn the process you need to make installation seamless. Plus, how to verify the tracking code is installed properly and working.  Considerations:

On April 27, 2020, Google Optimize released a new Java Script (JS) installation snippet. As a result, the method for installing Google Optimize within Shopify changed.

Previously, the old Google Optimize snippet (released prior to April, 2020) was installed in the “Additional Google Analytics JavaScript” code section.

With the updated Google Optimize snippet, this installed method no longer works.

You must now install Google Optimize in the theme header; this method is not preferred because the installation could get lost, or altered, if the theme is modified. However, it’s now the only option, unless you use a plugin.


Here are step-by-step video instructions for installing the updated Google Optimize installation snippet within a Shopify theme: 

Notify of
Newest Most Voted
Inline Feedbacks
View all comments
3 years ago

no matter what I do I can't get Optimize to work on my checkout page. It is working on all other pages.

Fabian Sohns
2 years ago

I exactly followed the instructions (it's straightforward).
But when it comes to verifying/ checking the installation, Google Optimize opens the editor page (covered by a grey curtain) and shows an error message (translated from german):

"The Optimize editor cannot be loaded. Third-party cookies from and must be allowed. Please check this and in addition your network connection and CSP policies ( Then try again."

I already added them in chrome, always allowing cookies (and 3rd party cookies) installed "Ignore X-Frage Headers"-Chrome extension. But it's not working.

Can you help me out here?

Other Posts You Might Enjoy

linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram