SOP 059: How to Setup Google Optimize to Run A/B Tests on Your Website

How to setup Google Optimize to run A/B tests on your website

Last Updated / Reviewed: Jan 10th, 2023

Execution Time: 30 min

Goal: To successfully set up Google Optimize on any website.

Ideal Outcome: Your Google Optimize setup is running, tested, and ready for you to start experimenting.

Prerequisites or requirements: To follow this SOP you need to have Google Tag Manager and Google Analytics setup on your website. If you don’t have them, you can follow these SOPs:

Why this is important: A/B Testing allows you to make careful data-driven changes to your user experience. Google Optimize is free and integrates perfectly with your existing Google Analytics property.

Where this is done: In Google Tag Manager, and Google Optimize.

When this is done: Only once per website.

Who does this: The person responsible for Website Management, or Conversion Rate Optimization.


Environment Setup

  1. Install the Optimize Chrome extension for Google Chrome;

Signing up for Google Optimize

  1. Using Google Chrome via the Google Optimize extension, click the extension so you will be redirected to the Google Optimize start panel.
  2. Sign in with your Google Account → Click “Get Started” button.
  3. Select your notification settings → Click “Next”
    Note: If you don’t want to receive promotional emails, or share your account’s data just select “No, thanks” on all three.

     

     

  4. Select your account settings, select your country, tick read and accept the terms of service and data processing terms as required by GDPR → Click “Done”
    Note: If you don’t want to share your account’s data just untick all three.

     

  5. You will now be redirected to your ‘My Container’ page, click ‘Settings’ at the topmost right portion of this panel.
  6. In the ‘Container Settings’ panel, take note of your Google Optimize ID (which will be used later in this SOP) and click the ‘Link to Analytics’ button.
  7. In the ‘Edit link to property’ panel, choose your Google Analytics property from the dropdown. Choose the Universal Analytics, not the GA4 property. You can identify your Universal Analytics property by noticing the ‘UA-’ prefix in the Property ID. Then, check the views you wish to connect to Google Optimize.

Note: If you don’t see your Google Analytics property on the drop-down make sure you are logged in with a Google Account that has enough user-permissions to do so.

Deploy Google Optimize through Google Tag Manager

Note: The process described below will allow you to deploy Google Optimize without needing a developer or editing the code of your site. However, if you have access to either of those you might want to add the code directly to your site since it will slightly increase the speed at which the variations are shown to users (adding the code to directly to your site is out of the scope of this SOP, but you can find documentation here)

  1. On another Google Chrome tab, go to https://tagmanager.google.com/
  2. Log in with your Google Account
  3. If you have multiple containers, select the one related to the website you want to deploy Google Optimize on:
  4. Click ‘Tags’ → ‘New’
  5. Rename your tag, click ‘Tag Configuration’ icon, then choose ‘Google Optimize.’
  6. Insert your “Optimize Container ID” that you got from the last chapter of this SOP and select your Google Analytics settings variable:
  7. Click the ‘Save’ button in the topmost right portion.
  8. If prompted ‘No Triggers Selected,’ click ‘Save tag’ anyway.
  9. Locate and click on your Google Analytics Page View tag:
    1. Note: Typically, your Google Analytics Page View tag will be of the type “Universal Analytics” and it will be set to fire on “All Page Views”.
  10. Click the ‘Tag Configuration’ section → ‘Advanced Settings’ → ‘Tag Sequencing’ → Tick ‘Fire a tag before’ → Select your Google Optimize Tag.
  11. Finally, click ‘Save’ button in the topmost right portion.
  12. If you now click on “Overview” on the sidebar, this is how your Google Tag Manager overview dashboard should look like:
  13. If everything looks ok, you are now ready to hit “Submit.”
  14. In the Submission Configuration panel, you will be given the chance to add a name and description to this version. After you have done so, hit “Publish”.
    Note: Adding a name and description is optional but recommended. You should enter information here that will make it easy to know what changes are being made
  15. That’s it! You will now be taken to see the summary of the changes you’ve just made:

Creating a Test Experience and Verifying Your Setup

  1. Back in your Google Optimize ‘My Container’ tab, click the ‘Let’s Go’ button under ‘Create your first experience.’
  2. In ‘Create Experience,’ input the name of your test, the URL of the page you need to optimize, then click ‘Create.’
  3. You will be redirected into the ‘Details’ tab, scroll down to edit the ‘Description’ then click ‘Link to Google Analytics’ button.
  4. Select your Google Analytics property → Select the Views within that property that you want to link to your experiment.
  5. Now, you need to set your ‘Objectives’. There are a lot of objectives you can set (both ‘Custom’ and ‘From List’) — you can choose any single one for this test.
  6. Under ‘Settings’ and ‘Optimize installation,’ click ‘Check Installation’ to verify if Optimize has been correctly installed.
  7. Click “Run Diagnostics” and after a few seconds you should see a success message.
    Note: If you get an error message letting you know Google Analytics isn’t installed on your website, make sure that you do not currently have any privacy extensions, adblockers, or that you are not using the Google Analytics Opt-Out Browser Add-on.
    Note 2: It’s also possible although less accurate to use Google Tag Assistant to check if Google Optimize is running on your website, to do so, navigate to the page you want to check, click on the extension, and make sure you have a “Google Optimize” entry on the list with the green tag symbol to the left of it.
  8. That’s it! You have successfully set up Google Optimize and are now ready to start running your experiments.

Was this article helpful?