30 days free. No credit card. Full access from the moment you connect your site.

Start free trial

Update Google Consent Mode

consent/update-google-consent-mode switches Google Consent Mode on or off and sets its delivery options.

The value is read back after the write, and a mismatch is reported rather than assumed saved.

At a glance

Abilityconsent/update-google-consent-mode
ToolsetCookieYes — toolset/cookieyes
GroupCookieYes › Configuration
RequiresCookieYes, active on the site
Capabilitymanage_options
SafetyWrites data
RepeatableIdempotent — running it twice leaves the same result
Ships inAcrossAI Abilities Manager 0.0.34 and later

Written, then checked

This setting lives in the shared consent store, where other plugins and the consent plugin’s own screens also write. A write that is accepted and then overwritten, or filtered on save, looks identical to a write that worked — until somebody checks the front end days later.

So the ability reads the value back and compares. Reporting the mismatch is the useful behaviour here, because the alternative is a confident success message about a setting that did not change.

Turning the mode on is the consequential part. It changes how every Google tag on the site behaves before consent, and the defaults it applies in that window are configured elsewhere on the plugin’s screen — this ability sets the switch and the delivery options, not the per-type defaults.

wait_for_update is in milliseconds, and it is a genuine trade-off: too short and tags act on the defaults before the visitor’s choice arrives; too long and measurement is delayed on every page.

Input

NameTypeRequiredWhat it is
statusbooleanNoWhether Google Consent Mode is active.
wait_for_updateintegerNoMilliseconds Google tags wait for a consent update before acting on the defaults.
url_passthroughbooleanNoWhether to pass ad click information through URLs when consent is denied.
ads_data_redactionbooleanNoWhether to redact ads data when advertising consent is denied.

What comes back

NameTypeWhat it is
google_consent_modeobjectThe configuration after the write, as read back.
successbooleanWhether the call completed.
messagestringA one-line summary of what happened, suitable for showing a human.
error_codestringPresent only on failure — a stable machine-readable reason, such as a missing field, a wrong field type or an unmet confirmation.

Example

Ask your assistant:

Turn Google Consent Mode on with a 500ms wait.

It resolves to one call:

{
  "ability": "consent/update-google-consent-mode",
  "parameters": {
    "status": true,
    "wait_for_update": 500
  }
}

Worth knowing

  • Idempotent.
  • A reported mismatch means something else is writing the same store.
  • The per-consent-type defaults are set on the plugin’s own screen, not here.
  • Confirm it is reaching Google with the reported status ability, which needs a linked account.

Related abilities


Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager

Browse the rest: Every ability, by category


Keep reading