There’s an error I encountered when I created and tried to run a A/B test which reads: “Anti-flicker snippet installed after the Optimize snippet. The anti-flicker snippet needs to be installed before the Optimize snippet in the page.”
Followed by a warning says: “Anti-flicker snippet configuration error
The Optimize container is loaded via Google Tag Manager. The anti-flicker snippet should be configured to use the Tag Manager container ID (GTM-XXXXXXX), not the Optimize container ID (OPT-XXXXXX). 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 anti-flicker snippet.”
Could you please advise should I address this issue and how?
Thank you so much.
]]>This page isn’t sending pageview hits to your Google Analytics property configured for this experiment. 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.
—
I have a new website, futbolstudio.com, using WordPress that I recently created a Google Analytics account and Google Optimize account. I just installed the Google Site Kit plugin and I see that both of these accounts are connected. There is no data available yet from Google Analytics.
How do I fix the error so that I can start the Google Optimize experiment? Any help is appreciated. Thanks!
I’m using Cookiebot WordPress Plugin and I’d like to implement Google Optimize in my GTM container to perform an A/B test. In order to avoid page flickering, Google Optimize suggests to insert a fix script reported at this documentation before the Google Tag Manager script.
I know that Cookiebot script should be at the top of the HTML header however it looks like that even if the Google Optimize Anti-flickering script is set before wp_head() in header.php Cookiebot is still able to push my script after the ones handled by Cookiebot.
Could you please let me know If I’ve missed something?
Here is my plugin configuration
WordPress Version: 5.7.5
WordPress Language: it-IT
PHP Version: 7.4.27
MySQL Version: 5.6.51
--- Cookiebot Information ---
Plugin Version: 4.0.2
Cookiebot ID: XXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX // I've removed it for privacy
Blocking mode: auto
Language: it
IAB: Not enabled
CCPA banner for visitors from California: Not enabled
CCPA domain group id:
Add async/defer to banner tag: None
Add async/defer to declaration tag: async
Auto update: Not enabled
Hide Cookie Popup: No
Disable Cookiebot in WP Admin: Yes
Enable Cookiebot on front end while logged in: No
Banner tag: <script type="text/javascript"
id="Cookiebot"
src="https://consent.cookiebot.com/uc.js"
data-cbid="XXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX"
data-layer-name="dataLayer"
data-culture="IT"
data-blockingmode="auto"
></script>
Declaration tag: <script
type="text/javascript"
id="CookieDeclaration"
src="https://consent.cookiebot.com/XXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXX/cd.js"
data-culture="IT"
async></script>
GTM tag: <script>
(function (w, d, s, l, i) {
w[l] = w[l] || []; w[l].push({'gtm.start':new Date().getTime(), event: 'gtm.js'});
var f = d.getElementsByTagName(s)[0], j = d.createElement(s), dl = l !== 'dataLayer' ? '&l=' + l : '';
j.async = true; j.src = 'https://www.googletagmanager.com/gtm.js?id=' + i + dl;
f.parentNode.insertBefore(j, f);})(
window,
document,
'script',
'dataLayer',
'GTM-XXXXXX'
);
</script>
GCM tag: <script data-cookieconsent="ignore">
(function(w,d,l){w[l]=w[l]||[];function gtag(){w[l].push(arguments)}
gtag("consent","default",{ad_storage:d,analytics_storage:d,wait_for_update:500,});
gtag("set", "ads_data_redaction", true);})(window,"denied","dataLayer");
</script>
--- Activated Cookiebot Addons ---
Embed autocorrect (statistics, marketing)
]]>I’d like to ask you about the correct installation of Google Optimize with your plugin installed + how to add the anti-flickering script.
Currently this is my setup:
– GTM4WP plugin Installed via custom code in header.php
– Google Optimize installed via Google Tag Manager (trigger: all pages)
In this moment I have significant flickering, so how do I install anti-flickering? Via your plugin? Via code in header.php? Via GTM?
Thank you so much!
Marco
Someone I replaced used this plugin to install Google Optimize. The fact is, we don’t have utility for it anymore.
After deleting the plugin and disconnecting the datas through the platform, I still see the scrpit being fired on my pagespeed insights test. That mean that the script is still on the site slowing it down.
Can you help me get rid of it completely? I would know how to do that, but we are using Divi and I don’t want to break the site.
Thanks in advance
]]>We found problems with the Optimize installation on this page
Refer to the diagnostics below to fix problems and troubleshoot any issues with your installation. Learn more about diagnostics .
Errors
Analytics pageview not detected
This page isn’t sending pageview hits to Google Analytics property (UA-144911019-1) configured for this experiment. 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.
Suggestions
Anti-flicker snippet not found
You haven’t installed the anti-flicker 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.
Reference web URL: https://vimoryapp.com/
]]>—
I have a new website, meatfreed.com, using WordPress that I recently created a Google Analytics account and Google Optimize account. I just installed the Google Site Kit plugin and I see that both of these accounts are connected. There is no data available yet from Google Analytics.
How do I fix the error so that I can start the Google Optimize experiment? Any help is appreciated. Thanks!