Support Forum › Support Forum › GDPR Cookie Compliance › Banner being classed as Largest contentful paint (LCP) element
- AuthorPosts
- PremiumDecember 12, 2022 @ 8:53 pm
Hi, since we installed the plugin we’ve been getting lower LCP scores on some pages.
Looks like google is seeing the banner as the LCP element and therefore (as it loads quite late) giving us a really high number of seconds.
Some other similar plugins offer the ability to delay showing of the banner to avoid this problem. (https://support.cookie-script.com/article/175-banner-initialization-delay#:~:text=Cookie%20banner%20initialization%20delay%20could,satisfaction%20with%20their%20browsing%20experience.)
Any suggestions to be able to include such a delay myself?
Or can i request that this becomes a feature please?
Thanks!
Moove Agency
December 13, 2022 @ 12:34 pmHi Ryk,
You can add the following to functions.php delay loading:
add_filter( 'gdpr_init_script_delay', 'gdpr_delay_script_execution', 20, 1 ); function gdpr_delay_script_execution( $ms ) { return 5000; // 5000 ms = 5 seconds. }
Hope this helps.
Moove Agency
February 02, 2023 @ 1:13 pmHello,
Just a quick update
The ‘Banner initialization delay’ is now a feature added to the CMS:
Hope this helps.
- AuthorPosts
The topic ‘Banner being classed as Largest contentful paint (LCP) element’ is closed to new replies.