Set Up a Cookie Consent Banner from a Site Scan with WPConsent and AI
Scan your site, add the services it found, and turn the banner and script blocking on with your yes.
Prerequisites
A site connected to WPVibe running WPConsent 1.2.1 or newer (tested on 1.2.1, free) on WordPress 6.9 or newer, with an administrator account.
My WordPress site uses WPConsent. Set up its cookie consent banner from a scan of my site. 1. Run discover_abilities with category wpconsent-settings, then wpconsent-scanner, wpconsent-cookies and wpconsent-tools. If the WPConsent abilities this needs are not there, stop and tell me to install or update the free WPConsent plugin (1.2.1 or newer, on WordPress 6.9 or newer). 2. Run wpconsent/get-settings and wpconsent/get-banner. Tell me in plain words whether the banner is on (content.enable_consent_banner), whether script blocking is on, whether default_allow is on (then scripts run until the visitor declines, not until they accept), and whether a cookie policy page is set (cookie_policy_page 0 means none). Keep both results in this chat: they are what to go back to. 3. Before scanning, tell me the scan reads my home page and any pages picked for scanning in WPConsent, and sends their HTML to WPConsent's scanner service. Run wpconsent/get-scan-results and note its date, then run wpconsent/run-scan. If it says a scan ran recently, use the saved scan from get-scan-results, saying when it ran; if its date is null, or I tell you it is older than my latest changes, tell me to try again after retry_after seconds, or to use WPConsent's Scanner screen, and stop. A scan ran recently is WPConsent's own limit, not my host's. If run-scan fails any other way, tell me its message and stop; don't retry. If the reply was cut short, run wpconsent/get-scan-results again: a date that changed from the one you noted means the scan finished and was saved, so use that. If complete is false, tell me to run the scan from WPConsent's Scanner screen in WordPress admin, and stop. If it found no services but I use analytics, ads, chat or popups, tell me that is unexpected (a slow home page can come back empty) and suggest the Scanner screen. 4. Show me what the scan found, by category: each service, what it does and how many cookies it sets. Run wpconsent/list-services and tell me which are already set up. Ask me which of the others to add. Essential cookies can't be declined by visitors, so never move a tracking, advertising or chat service into Essential. 5. If I picked none, skip this step: without services, the ability adds every service the scan found. Otherwise run wpconsent/configure-detected-services with services set to the slugs I picked (from services_needed). Don't send enable_script_blocking or confirm. If manual_toggle_services is true in step 2, tell me first that each added service brings the banner back for returning visitors. Then run wpconsent/list-services and wpconsent/list-cookies and confirm each service I picked is there with its cookies. 6. If the banner is off, show me its message and ask whether to keep it or use [your banner message, or keep the default]. If it says that using the site means consenting to cookies, tell me that doesn't match a banner where visitors choose, and suggest a plain alternative. Tell me turning it on shows it to every visitor at once. Only on my yes, run wpconsent/update-banner-content with enable_consent_banner true, plus banner_message if I gave one. 7. If the banner is still off, skip this step: script blocking can't be on without it. If script blocking is off, tell me what it does: WPConsent holds back the scripts of the statistics and marketing services it recognizes until the visitor accepts that category, so for visitors who decline, those tools don't run. Name the ones on my site from step 4, such as popups, pixels or WooCommerce order tracking (WPConsent leaves that one alone while the WP Consent API plugin is active). Embedded videos and maps (YouTube, Vimeo, Google Maps) are held back only while WPConsent's content blocking (enable_content_blocking) is on, and it is off after install: if it is false in step 2 and the scan found one, tell me they load before consent and that content blocking is a setting on WPConsent's Cookies screen. Tell me it holds back every script it recognizes, including services I chose not to add, which still load for visitors who accept that category without being listed in the banner, and tell me Google's tags and Microsoft Clarity are handled in step 8. Only on my yes, run wpconsent/update-settings with enable_script_blocking true. If I say no, tell me that with the banner on and script blocking off, every script loads before the visitor chooses. 8. If the banner is off, skip this step. If the scan found, or my service list has, a Google service (Google Analytics, Google Tag Manager or Google Ads) or Microsoft Clarity: Google Consent Mode needs care: on a site where it was never saved, wpconsent/get-settings reports google_consent_mode false while WPConsent treats it as on (Microsoft Clarity's clarity_consent_mode works the same way). To know which, run run_wp_cli with option get wpconsent_settings --format=json: if there is no google_consent_mode key, or the option is not found, it is on. While it is on, script blocking lets Google Analytics, Google Tag Manager and Google Ads scripts load instead of holding them back, and WPConsent sends them the visitor's choice once they make it. It sets Google's consent default (denied until the visitor accepts; granted instead while default_allow is on) only when a Google service is in its service list: without one, Google's tags load and collect as if consent were given until the visitor chooses. While it is off, script blocking holds them back until the visitor accepts. Tags that Google Tag Manager loads follow its container's own rules: they wait for consent only if they are set up to (WPConsent pushes a wpconsent_consent_processed event to the dataLayer for that). Microsoft Clarity works like this too while clarity_consent_mode is on (no key means on): its script is not held back, WPConsent sets no consent default for it, and it sends Clarity the visitor's choice only when they make one in the banner. While it is off, script blocking holds Clarity back until the visitor accepts its category. If script blocking is on, explain the two choices for each and ask which I want. If script blocking is off, don't offer turning them off: tell me that consent mode is then the only consent signal these tags get, and save it on after my yes, listing it as a change. If I keep Consent Mode on for Google, the Google service must be in my service list for the denied default to be set: if I left it out in step 4, tell me and offer to add it. Save the choice with wpconsent/update-settings, google_consent_mode only if a Google service was found or is in my service list, and clarity_consent_mode only if Clarity was, each true or false, so the settings say what the site does. If it asks for confirmation, tell me why and send confirm true only after my yes. 9. Never turn off the banner, script blocking or respect_gpc, and never turn on default_allow, in this job. 10. Run wpconsent/clear-cache, then run_wp_cli with cache purge so visitors get the banner (a CDN in front of my site may need its own purge). If cookie_policy_page is 0, tell me there is no cookie policy page yet. 11. List every change: the services added, the banner, script blocking and Google Consent Mode, before and after. To undo one, tell me the setting to switch back (to remove an added service, delete it on WPConsent's Cookies screen; its cookies stay in the database); don't use wpconsent/import-settings for that, since importing creates a second Cookie Policy page and can duplicate cookies. Then tell me to open my site in a private window, check the banner shows, decline, and check that my forms and checkout still work.
Skip pasting the full prompt. Drop this into your AI on a site that already has WPVibe:
Run the “Set Up a Cookie Consent Banner from a Site Scan with WPConsent and AI” recipe from the WPVibe cookbook on my connected site.
You installed a cookie banner plugin because you know you need one, then stopped at the settings: which scripts set cookies on your site, which category each belongs in, and whether turning on blocking will break your popups or checkout. Until that is done, WPConsent shows no banner at all.
The AI scans your site with WPConsent, shows you each service it found and the cookies it sets, and adds only the ones you pick. It turns the banner on, and script blocking, only after your yes, telling you first which tools on your site will wait for consent, and asks how you want Google’s tags handled. It changes nothing else and lists every change.
The scan reads your home page, and any pages you picked for scanning, and sends their HTML to WPConsent’s scanner service, and it can run once every 10 minutes. Afterwards, open your site in a private window, decline, and check that your forms and checkout still work. For the cookie policy page, use this recipe; to check the setup later, this one.
Outcome
The services on your site listed with their cookies, the banner on, script blocking and Google Consent Mode set the way you chose, and a list of every change.