Google Optimize will no longer be available after September 30, 2023. Your experiments and personalizations can continue to run until that date. Learn more

Optimize installation overview

Find the best Optimize snippet for your website.

Optimize is installed by adding a small snippet of code to your website to display new experiences to your visitors. There are different ways to install Optimize depending on your website's configuration and it's important to tag your site properly to get the best performance.


This article is for customers wishing to add Google Optimize to their website. It will guide you through the process of finding the correct Optimize snippet to add to your site's HTML.

Pick the best Optimize snippet for your site

Answer the following questions to find the version of Optimize that's right for your website:

1: Do you use a Tag Management Solution (TMS) like Google Tag Manager (GTM)?

  • Yes – Continue to question #2.
  • No – Skip to the Synchronous or asynchronous table.

2: Can you (easily) edit the <HEAD> of your website's HTML?

  • Yes – Continue to the synchronous or asynchronous table.
  • No – Use the Optimize tag template in Google Tag Manager.

3: Synchronous or asynchronous?

Answer the questions in the left of the table below to help decide between the synchronous and the asynchronous version of Optimize:

  Synchronous (sync) Asynchronous (async)
Coverage vs. speed? Prioritize experiment eligibility/coverage with a small performance hit. More visitors will be eligible for experiments Prioritize page loading speed over experiment eligibility/coverage. Visitors that timeout may be ineligible for experiments.
My visitors use... High-speed connections (5G, 4G/LTE) Lower-speed connections (3G or slower)
Should I add the anti-flicker snippet?

Yes – If you're targeting Google Analytics audiences, Google Ads, or 'Time since first arrival' (behavior).

No – If you aren't using any of the targeting types mentioned above, you don't need to install the anti-flicker snippet.

Optional. In most cases you don't need to install the anti-flicker snippet.

Next steps

Choose the best Optimize snippet for your website:

Was this helpful?
How can we improve it?
Clear search
Close search
Google apps
Main menu
Search Help Center