Releases: udiinsight/insight-cookie-banner
Release list
v2.0.2 — WP Rocket delayed JS fix
Fixes the consent banner never appearing on sites running WP Rocket with Delay JavaScript Execution enabled.
The bug
WP Rocket delayed banner.js until the visitor's first interaction, so the banner's hidden attribute was never removed. Meanwhile the head script had already set Google Consent Mode defaults to denied, leaving visitors unable to grant consent until they moved, scrolled or clicked. Google Ads received no _gcl_aw cookie and could not attribute conversions.
The fix
The plugin now registers rocket_delay_js_exclusions for its own scripts, and — when Google Consent Mode is enabled — for the Google tag scripts it depends on:
insight-cookie-banner,data-icb— alwaysgoogletagmanager.com,google-analytics.com— under Consent Modegtag(,gtm.start— under Consent Mode, so inline configuration snippets carrying only a measurement ID are excluded too
Customisable via the icb_delay_js_exclusions filter.
Note
Excluding Google tags from Delay JS trades some PageSpeed score for correct measurement. Sites that would rather keep the delay can drop those patterns through the filter.
Install
Download the zip below and upload it via Plugins → Add New → Upload Plugin. Clear the WP Rocket cache afterwards, including minified CSS/JS.