Back to all lessons
Lesson library

Integrate Google Optimize for A/B and multivariate testing

Integrate Google Optimize into your Webflow project to run A/B tests and other experiments — create a better experience.

Note: We’re transitioning to Workspaces, and are in the process of updating our content. Visit the Workspaces blog post to read more about these updates and changes, or visit our updated lesson on how to integrate Google Optimize for A/B and multivariate testing. You can also learn how to check if your account is on Workspaces.
This video features an old UI. Updated version coming soon!

Google Optimize [↗] enables you to test variations of your websites and web pages for free. You can run tests on your content to understand what works best for your site visitors. You can use Google Optimize for A/B testing as well as running multivariate and redirect tests.

You can integrate Google Optimize on any of your Webflow projects from your project’s integration settings page after you enable Google Analytics on that project.

Note: Slow site speed is a known issue when integrating Google Optimize (users generally experience a performance decrease of 50 percent). You can remove the integration and republish your project to prevent it from negatively affecting your site speed.
In this lesson
  1. Generate an Optimize container ID
  2. Integrate your Optimize container ID into your project
  3. Enable Google Analytics (required)
  4. Run tests
  5. Troubleshoot your Optimize integration
Before getting started

Check out these resources to learn more about Google Optimize:

Generate an Optimize container ID

Visit the Google Optimize [↗] homepage, create a new container, and copy the container ID.

Learn more

Integrate your Optimize container ID into your project

Return to your project’s integration settings and paste the Optimize container ID you copied.

Three steps are highlighted on the Project settings page of a project. Step one, go to the Integrations tab. Step two, enter the Container ID in the Google Optimize section of the page. Step three, click on the green save changes button.
Paste the ID you copied in Project settings → Integrations → Google Optimize → Container ID. Save for the changes to take effect.

Remove Optimize from your project

To disable Optimize on a project, delete the container ID, save changes, and publish your site.

Enable Google Analytics

To use Optimize, you'll also need to integrate Google Analytics into your project. So, if you haven’t already integrated a Google Analytics Tracking ID, go ahead and do so on the same Integrations settings page of your project.

Learn more: Setting up Google Analytics

It’s recommended, not required, to enable Global site tag (gtag.js).

This integration links your Google Analytics property to your Webflow project. You can also link the same Google Analytics property to Optimize to access data about running experiments in Analytics.

Learn more: Link Optimize to Analytics [↗]

Run tests

Now that you’ve integrated Google Analytics and Optimize into your project, you can start running tests using Optimize. Publish your site to get started.

Learn more: Optimize first-time user guide: create your first experience [↗]

More resources

A/B testing

A/B testing is a simple method of running optimization tests on your website. To run an A/B test, create two different versions of a web page that differ in one way, such as having different headings. Then, split traffic between the two versions and watch your analytics to see which version (A or B) produces better results. It's important that you only change one element of variant B. Otherwise, you won't know which change led to better performance!

Learn more: Create an A/B test [↗]

Split testing or Redirect test

Split testing, or redirect testing, is a different type of A/B testing. Redirect tests allow you to test two different landing pages (different URLs), for example a redesign of your homepage.

Learn more: Create a redirect test [↗]

Create a multivariate test (MVT)

Unlike A/B testing, multivariate testing (MVT) allows you to test many elements on a page at the same time. This is helpful to understand if many sections of a page work well together.

Learn more:  Create a multivariate test (MVT)  [↗]

Troubleshoot your Optimize integration

Optimize Diagnostics will notify you when there are potential issues with your integration. Optimize lets you know what the issue is so you can make the necessary changes to resolve it.

Learn more: Installation Diagnostics [↗]

If Optimize is not found on your site

  1. Go to your project settings →  Integration page and make sure the Google Optimize container ID is saved in your settings
  2. Visit Google Optimize [↗] and check that you’re using the correct container ID
  3. Re-publish your site and visit your site in a new window to test the integration

If the issue is related to Google Analytics

If Analytics tracking code is not found on your site, or Analytics pageview is not detected, or an Unsupported Analytics tracking code is found on your site:

  1. Go to your project settings →  Integration page and make sure your Google Analytics Tracking ID is saved in your settings
  2. Check your Google Analytics [↗] settings and ensure that the correct Tracking ID is being used on your site
  3. Re-publish your site and visit your site in a new window to test the integration

If a Wrong Google Analytics tracker is used to load Optimize, it means you’re most probably not linking the same Google Analytics property that you’ve integrated into your Webflow project to Optimize. To fix this issue, make sure you’re using the same property Tracking ID in your integration in Webflow as the one you’ve linked to in Optimize.

If there's a snippet issue

If the issue is none of the above, and Optimize tells you that there's an issue with how Optimize is installed on your website (code or snippet issue), please contact us and we'll help resolve it.

Try Webflow — it's free