The Optimize visual editor automatically checks to ensure that your installation is optimal each time you use it. You can verify your Optimize installation at any time by clicking RUN DIAGNOSTICS in the experiment information panel. A diagnostic messages will appear in the header of the experiment details page or experiment information panel (pictured below) when an issue is detected.
Following is a list of installation diagnostic messages with instructions on how to address them.Errors
- Optimize plugin not found
- Analytics tracking code not found
- Analytics pageview not detected
- Unsupported Analytics tracking code found
- DataLayer variable in page-hiding snippet reassigned
- DataLayer variable name mismatch
- Wrong Analytics tracker used to load Optimize
- Legacy Optimize snippet
- Analytics configuration mismatch
Optimize plugin not found
The web page page doesn't have Optimize plugin installed. You can still use the visual editor to create variants but you can't use Preview mode to test them and visitors won't see your experiment. To run an experiment you must first install Optimize.
Analytics tracking code not found
The web page is not tagged with Google Analytics tracking code for the Analytics property configured for this experiment. You won't be able to measure usage of your site nor monitor the performance of Optimize experiments. To run experiments, you must first install the Analytics tracking code (either analytics.js or gtag.js).
Analytics pageview not detected
This page isn't sending pageview hits to Google Analytics. You won't be able to measure usage of your site or monitor performance of Optimize experiments. Make sure that your Analytics tracking code (either analytics.js or gtag.js) is set up correctly.
Unsupported Analytics tracking code found
The page is tracked with the legacy Google Analytics (ga.js) tracking code which isn't supported by Optimize. Update your Google Analytics tracking code to either analytics.js or gtag.js to use Optimize.
DataLayer variable in page hiding-snippet reassigned
The page-hiding snippet works by referencing a dataLayer variable that can be shared between Google Tag Manager containers and Optimize containers on a page. This can occur when the dataLayer variable gets re-initialized later on the page. That can happen when you have a Google Tag Manager snippet later on the page and you initialize the dataLayer variable again instead of updating its values. The Optimize tagging best practice is to move the dataLayer initialization above the page-hiding snippet and to ensure that you don't re-initialize it later on the page. Less commonly, this diagnostic can occur when there is a syntax error in the page-hiding snippet or the page-hiding snippet has been commented out in your source code. Learn more about Using a Data Layer on Google Developers.
DataLayer variable name mismatch
The dataLayer variable used in the page-hiding snippet is different from the variable used to load the container. This can happen when the Optimize plugin is installed via Google Tag Manager but it uses a different dataLayer variable name. You must use the same dataLayer variable name for both Tag Manager and the page-hiding snippet.
Wrong Google Analytics tracker used to load Optimize
The Google Analytics code used to load the Optimize container is configured with a different Analytics property than the property linked to this Optimize container. This may cause some experiment measurements to be lost. Learn more about how to link to an Analytics property and how to troubleshoot linking.
Legacy Optimize snippet
You're using a legacy Optimize snippet that isn't supported. Upgrade your Optimize plugin using the instructions in Deploy Optimize.
Analytics configuration mismatch
All Analytics tracking code on your page must have the same tracker configuration settings. This is important a) if you use Google Tag Manager to fire Analytics hits, and you use hard-coded Analytics + Optimize code to deploy Optimize, or b) if you deploy Analytics and Optimize tags via Tag Manager. If you deploy Optimize via a Tag Manager tag, the best practice is to use the shared Google Analytics Settings variable in Tag Manager, which ensures your tracker settings match between tags.
The following fields must have the same value in both Tag Manager and Analytics:
'clientId', 'sampleRate', 'siteSpeedSampleRate', 'alwaysSendReferrer', 'allowAnchor', 'allowLinker', 'cookieName', 'cookieDomain', 'cookieExpires', 'cookiePath', 'legacyCookieDomain', 'legacyHistoryImport', 'storeGac'
Page-hiding snippet timed out
The page-hiding snippet might not be configured correctly or the timeout value is too short. The page-hiding timeout is a worst-case scenario. Your page will only be hidden for the full timeout if the experiment cannot execute sooner (and when it does, the page is unhidden immediately). When page-hiding times out, your experiment doesn't run on that page load, which can limit the efficacy of your experiment and results. Regardless of timeout value, ensure that the Optimize plugin is deployed correctly and not late in the page (e.g. in the
Page-hiding snippet configuration
The Optimize container is loaded via Google Tag Manager. The page-hiding snippet should be configured to use the Tag Manager container ID, not the Optimize container ID. While this won't cause a problem when always firing the Optimize tag, it can adversely affect your site performance when you stop firing it, or if you fire it conditionally. In this case the best practice is to use the Tag Manager container ID in the page-hiding snippet.
Page-hiding snippet not in HEAD
The page-hiding snippet must be installed near the top of the
<HEAD> element of your web page, right after the dataLayer variable is initialized. Do not install the page-hiding snippet through a tag management system (TMS) or another asynchronous script. The page-hiding snippet needs to run before the page is displayed in order to function properly, otherwise you may experience flicker or the performance of your site may be adversely affected.
Non-standard page-hiding snippet
A non-standard page-hiding snippet was detected. The page-hiding snippet shouldn't be installed via Google Tag Manager, other tag management system or asynchronous script. The page-hiding snippet needs to run before the page is displayed in order to function properly, otherwise you may experience flicker and performance of your site can be impacted.
Page-hiding snippet not found
You haven't installed the page-hiding snippet and your visitors may experience page flicker, where they briefly see the original page before your experiment loads. This can skew your experiment results and confuse visitors.
Page-hiding snippet timed out too fast
The page-hiding snippet timeout value is too short. When page-hiding times out, your experiment doesn't run, decreasing the amount of visitors that will see it. The page-hiding timeout value is designed as a worst case scenario, not the actual time that your page will be hidden.
Optimize plugin not in HEAD
For best performance, the snippet that loads the Optimize plugin (whether it's Analytics, Tag Manager, or gtag.js) should be installed in the
<HEAD> element of your web page, immediately after the page-hiding snippet. The Deploy Optimize help center article and tagging best practices section contain more information on the best way to deploy Optimize.