Mat Christensen

How To Install Google Optimize To WordPress

Posted
on October 25, 2017

If you’re a data driven badass, like us here at MOJO, then you’re going to want data to backup the user experience (UX) of your website. You can take control of your website and conversion rate with Google Optimize, here’s a step-by-step guide to get it running on your site.

Why Use Google Optimize on Your Site?

Google Optimize gives you the power to test, analyze and ultimately improve your website. You can A/B test elements of your website so you can analyze your user’s interactions within your site, and ultimately improve your website piece by piece.

Here’s an example of how you might use Google Optimize for your WordPress website:

Let’s say you have a hypothesis that a bigger, more prominent button attracts more conversions than a smaller button. You can use optimize to A/B test the size and color of the Buy Now Button on your WooCommerce pages. Once you have the data on which converts better, you can make a change, or cross that off your list.

Step 1: Create An Optimize Account

First, to create a Google Optimize account, follow this link and click get started.

Next, enter your account name and container name.

Your account name should be your businesses name, and your container name should be the name of your website.

Step 2: Link Google Analytics

Now you need to link your analytics account to your optimize account. (If you don’t have analytics set up yet, go here and get that ready!) You can do this within your container by clicking Link Property in the right hand information panel.

Step 3: Add The Main Optimize Snippet

Now create a new tag and name it Google Optimize tag. Configure your tag and choose the Google Optimize predefined tag.

Add Your Google Analytics tracking ID and your Google Optimize ID, which should be in the form GTM-XXXXXXX. You can find your Optimize id in your Optimize Accounts Dashboard. Configure your analytics ID the same as your Google Analytics tag’s settings. And save your tag without defining any triggers.

Keep in mind that there are several ways to implement Google Optimize. If you prefer to do it a different way, you can also check out Google’s support pages.

The page hiding tag needs to be placed in the <head> section of your WordPress theme’s header.php file above the Optimize snippet. The priority is set this way because the page hiding snippet needs to load before your Optimize tag to ensure users don’t see their screen flicker as the A/B test loads.

To place the page hiding snippet in your theme’s header.php file navigate to your WordPress dashboard. Under Appearance click into the Editor. Find your Theme Header(header.php) and open the file to edit its contents.

Share this article!

About Mat Christensen

Hey There! I enjoy french toast on a Sunday morning, 2 eggs sunny-side-up and a cup of tea. Feel free to reach out via social media, I'd love to discuss anything SEO or web related. View all articles by Mat Christensen.

Build a Better Website with MOJO

MOJO Marketplace is a community of web professionals providing digital goods and services that empower you to Build a Better Website.