Check Your Cookie Banner Setup with Cookiebot and AI
A read-only check of Cookiebot's settings and of what your pages load, in order, with the first fix named.
Prerequisites
A site connected to WPVibe running Cookiebot by Usercentrics 4.7 or newer (tested on 4.8.1, free) on WordPress 6.9 or newer, with an administrator account, and a Cookiebot or Usercentrics account for the banner itself.
My WordPress site uses the Cookiebot by Usercentrics plugin. Check that my cookie banner is set up and reaches my visitors. Don't change anything. 1. Run discover_abilities with category cookiebot. If the cookiebot abilities this needs are not there, stop and tell me to install or update the free Cookiebot by Usercentrics plugin from WordPress.org (4.7 or newer, on WordPress 6.9 or newer). 2. Run cookiebot/get-status and cookiebot/verify-setup. Tell me in plain words whether an ID is set, whether the banner is switched on (banner_enabled: verify-setup does not check it), the blocking mode, whether Google Consent Mode is on, and each issue verify-setup lists. If no ID is set, tell me the plugin adds nothing to my pages until one is, and skip to step 5. 3. Run run_wp_cli with option get cookiebot-cbid and tell me which kind of ID it is. If option get comes back empty or not found while cbid_set is true, the ID is set for the whole multisite network: read it from the banner script on my home page (get_page_html, url set to my home page's address) and tell me it is set network-wide. A Cookiebot Domain Group ID is 36 characters: letters a to f (in any case) and digits in groups of 8, 4, 4, 4 and 12, joined by dashes. A Usercentrics Settings ID is 9 or 14 characters: letters, digits, underscores or dashes. If it is a Domain Group ID with any capital letters, tell me that is a setup error: the plugin loads the Usercentrics script for it instead of Cookiebot's, and saving it again in lowercase fixes it. 4. Read my home page and [one more page, for example your contact or checkout page] with get_page_html, url set to each page's address. For a Domain Group ID, the banner script is the script with id Cookiebot loading from consent.cookiebot.com, and its data-cbid must be the ID. For a Settings ID, it is the script with id usercentrics-cmp, and its data-settings-id, or data-ruleset-id, must be the ID. Cookiebot's Google Consent Mode script is a gtag consent default call with ad_storage, ad_user_data, ad_personalization, analytics_storage, functionality_storage and personalization_storage denied, security_storage granted and wait_for_update 500, followed by a gtag set ads_data_redaction line. If more than one consent default call is on the page, list each, which plugin likely adds it, and which comes first. If Cookiebot's has type text/plain instead of text/javascript, tell me its defaults only run after a visitor consents, which happens in manual blocking mode with Consent Mode cookie categories chosen. A Google tag is a script whose src, or whose inline code, loads from googletagmanager.com, google-analytics.com or googleadservices.com (gtag/js, gtm.js, analytics.js). Tag Manager snippets pasted into the theme are inline code with no src. Judge the order only from tags written in the page source. get_page_html normally reads the page as the server sends it, but it can fall back to a headless browser render in which scripts have run and added tags. Treat the read as a render, and say the order and script types cannot be judged from it, if it has a script loading cc.js from consent.cookiebot.com, a script or link loading from web.cmp.usercentrics.eu/ui/v/, or a script with a src loading gtm.js (Cookiebot and the usual Tag Manager snippets add these in the browser), or WordPress's own scripts, such as jquery, with type text/plain (the Usercentrics autoblocker rewrites them in the browser), or if the cookie banner's own text or buttons appear in the page. Otherwise judge every tag as written, including a gtag/js script at the very top of the head. If the read is cut short, read on with offset until the end of the head tag; a Google tag after the head tag comes after the Consent Mode script. A Google tag with type text/plain and a data-cookieconsent attribute waits for consent (Cookiebot rewrites some plugins' tags this way): list it, but don't call it a problem. For a Settings ID with blocking_mode auto, the Usercentrics autoblocker script (web.cmp.usercentrics.eu/modules/autoblocker.js) should sit right before the usercentrics-cmp script: if the usercentrics-cmp script is there but the autoblocker script is not right before it, report that automatic blocking is off on Cookiebot's dashboard (or, on a multisite network, that the network's blocking mode differs) although get-status says auto. On each page, report the banner script, the Consent Mode script, and every Google tag with whether it comes after the Consent Mode script. Google's consent defaults have to be set before its tags load, so a Google tag above the Consent Mode script is a problem to fix. A Google Tag Manager loader that Cookiebot adds itself after its Consent Mode script (its Google Tag Manager setting) is expected. This read usually skips page caches, so it shows what the plugin adds now; tell me visitors may still get an older cached copy if I changed Cookiebot recently. Don't purge anything. If get-status says Consent Mode is off but Cookiebot's Consent Mode script is on the page, tell me it was most likely switched off with the cookiebot/toggle-gcm ability or with the toggle on Cookiebot's dashboard, which both leave the script in place (a toggle-gcm entry in the log in step 6 shows which), and that to really turn it off I should switch it off under Cookiebot, Settings, Google Consent Mode (not with the toggle on Cookiebot's dashboard) and save that screen; its switch may already look off. Then check the banner still shows. 5. Run run_wp_cli with plugin list --status=active. Name any other active plugin whose name mentions cookies, consent, GDPR or CCPA, except WP Consent API (wp-consent-api), which Cookiebot 4.8.1 or newer registers with, and ask me whether I mean to run it alongside Cookiebot. Don't deactivate anything. 6. Run run_wp_cli with option get cookiebot-ai-action-log --format=json. If the option is not found or empty, say no changes through the abilities are logged. If it has entries, list the changes AI tools made through Cookiebot's abilities: when (ts is a Unix timestamp), which ability, and the old and new values. Changes made on Cookiebot's settings screens are not in this log, and it never holds the ID itself. 7. Finish with a short report: what works, what needs me, and the first thing to fix.
Skip pasting the full prompt. Drop this into your AI on a site that already has WPVibe:
Run the “Check Your Cookie Banner Setup with Cookiebot and AI” recipe from the WPVibe cookbook on my connected site.
A cookie banner can look set up in WordPress and still not reach your visitors: the banner switched off in the settings, an ID saved in a form the plugin misreads, a Google tag that loads before the consent script. Cookiebot’s own setup check misses these. In our test it reported no issues with the banner switched off.
The AI reads Cookiebot’s status and setup check, then reads your pages as your server sends them. It confirms the banner script is there with your ID, that Google Consent Mode is there, and that every Google tag comes after the Consent Mode script. It names other consent plugins and lists the changes made through Cookiebot’s abilities. It changes nothing.
Name a second page worth checking, such as your contact or checkout page. The AI usually reads the page as your server sends it, so it sees what the plugin adds, not whether the banner then appears: open your site in a private window for that. To fix the ID, use this recipe; for Consent Mode, this one.
Outcome
A short report of what works and what needs you in your cookie banner setup, with nothing changed.