Hi @elbrr,
Thanks for using our plugins.
It seems the issue is related to AJAX script inject, you can add the following code snippet to your functions.php
add_action( 'gdpr_cc_prevent_ajax_script_inject', '__return_true' );
Also, you can keep the add_action( 'gdpr_enqueue_lity_nojs', '__return_false' );
code snippet as well. The ‘gdpr_disable_lity_enqueue’ could be removed.
Hope this helps.
Thanks
Thread Starter
elbrr
(@elbrr)
Thank you for the reply — I’ve implemented the code you suggest and the white screen is a little faster when I click “Accept All” but just as long as before when navigating to other pages. Any other ideas for things to try?
Thank you!
Hi @elbrr,
It seems you have an “Anti-flicker snippet” added to GDPR Cookie Compliance plugin.
The white page could be related to this “Anti-flicker” rule with Google Tag Manager which is not recommended. Read more about the flicker here:
https://support.google.com/optimize/answer/7100284?hl=en
So the recommended fix to you is to update the scripts on your site following the steps below:
3rd party – Header:
<!-- Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-XXXXXXX-Y"></script>
<script>
dataLayer = [{}];
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-XXXXXXX-Y');
</script>
<!-- End Google Analytics -->
<!-- Google Tag Manager -->
<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-ZZZZZZ');</script>
<!-- End Google Tag Manager -->
3rd Party – Body
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-ZZZZZZ"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
Note: Replace the UA-XXXXXXX-Y to your Google Analytics ID, and the GTM-ZZZZZZ to your Google Tag Manager ID.
Hope this fixes the white delay on your end but if still exists, you have to check the third party scripts loaded by your Google Tag Manager.
Thanks