Google Optimize

Optimize allows you to test variants of web pages and see how they perform against an objective that you specify. It monitors the performance of your experiment, and tells you which variant is best.

Before you begin this configuration in Google Tag Manager, ensure that your web page code is ready to handle Google Optimize tags:

  • For the best results, implement the JavaScript portion of your Tag Manager container snippet as high in the <head> of the page as possible. Learn more
  • Install the Optimize page-hiding snippet on pages where Optimize will be deployed.
  • Ensure that dataLayer declarations appear before the Optimize page-hiding snippet and Tag Manager container snippet. Learn more

Tag setup

  1. Click Tags and then New.
  2. Click Tag Configuration and then Google Optimize.
  3. Add Google Analytics Settings and enter your Optimize container ID (a.k.a. the Optimize snippet ID, available the Optimize Container setup panel.)
  4. Click More settings, and configure the Fields to Set and Advanced Configuration with the same values as your Google Analytics tags.
  5. Click Save, and proceed to save the tag without triggers.
  6. Open any Google Analytics Page View tags that are triggered on pages where you want the Google Optimize tag to be fired.
  7. Click to edit the Tag Configuration, and open Advanced Settings and then Tag Sequencing.
  8. Check the box to fire a tag before this tag fires, and select your Google Optimize tag as a “Setup Tag”.
  9. Save your tag configuration and repeat on any other Google Analytics Page View tags as relevant.
  10. Publish your Tag Manager container for the changes to take effect.
Important: Use Google Analytics Settings variables to ensure consistency between your Optimize and Analytics tags.
Was this article helpful?
How can we improve it?