WooCommerce: How to install Google Optimize

A/B testing is a the process of serving users with two version of a web page, to determine which one performs best. This is typically used as a way to trial and validate changes to a website which could improve usability and boost conversion rates.

One popular and free tool is Google Optimize. This short tutorial showcases how to install it on your WooCommerce store.

1. Install WooCommerce Google Analytics

In order to setup Google Optimize with our mini-extension, you'll need to have the official (free) WooCommerce Google Analytics plugin installed and configured on your website.

This plugin is available to download from the WooCommerce extension store here.

2. Add snippet to functions.php

Add the following code to your functions.php. Simply replace GTM-XXXXXXX with your Optimize container ID on lines 13 & 29.

Need to give your conversion rates a boost?

Give us a shout - we can chew the fat over your WooCommerce dilemmas and show you how to improve your customers’ online shopping experience! 🚀

Saul SampsonFriends call Saul the King of Improvisation. He secretly wants to be a full time musician, but nevermind, his genius is instead manifested in visual media, SaaS, and product management, often inspired by classical music, country rock, and keen sense for beauty, harmony, and efficiency. 🐅Contact Author