While Google Optimize is officially sunsetting on September 30, 2023, many merchants coming from Google Optimize may continue to have both the Optimize tracking script and anti-flicker script installed on their themes when using Shoplift.
Please be aware that Optimize scripts, specifically the Optimize anti-flicker script, will cause adverse interactions with the Shoplift tracking script with regard to page speed, and, in extreme cases, more than double the required time to load and render page content.
This occurs because both anti-flicker scripts leverage a "whiteout" method to hide page content until a response is received from a server to identify if a page is within the scope of a test and redirect accordingly. While Shoplift will dynamically add and remove the anti-flicker component from the Shoplift tracking script depending on whether a test is live or not, Optimize does not. When both anti-flicker scripts are present on a theme, a response from both Google Optimize and Shoplift is required to render the page.
We recommend removing the Google Optimize anti-flicker script from your theme prior to running tests with Shoplift to ensure a consistent and seamless shopper experience when conducting tests.