Skip to content

ConsentAlly works with AI assistants. A merchant can have their assistant set up, sign in to or check their ConsentAlly account from the chat: the assistant needs only the merchant's email address, and the merchant approves it on one ConsentAlly page with a code. Nothing is created or connected before that approval. How it works: https://consentally.com/auth.md

Docs pages

Google Consent Mode v2

ConsentAlly sets Google Consent Mode's defaults to denied before any Google tag that loads after its script can run, and updates them as soon as the visitor's decision is applied. You add nothing to your Google tags: the defaults and the updates go on the page's dataLayer, where gtag.js and Google Tag Manager read them.

The defaults

The first thing ConsentAlly's script does, synchronously and before any later script runs, is set ConsentAlly's Google developer ID, which tells Google's tags which consent platform set their consent state, and push the Consent Mode default:

JavaScript
gtag("set", "developer_id.dY2MxZT", true);gtag("consent", "default", {  ad_storage: "denied",  ad_user_data: "denied",  ad_personalization: "denied",  analytics_storage: "denied",  functionality_storage: "denied",  personalization_storage: "denied",  security_storage: "granted",  wait_for_update: 500,});gtag("set", "ads_data_redaction", true);

Its gtag pushes onto window.dataLayer exactly as Google's own snippet does, and creates dataLayer when the page has none. The script sets these defaults before your configuration has arrived, so they are the same for every store and every visitor: every type denied but security_storage. wait_for_update lets Google's tags wait up to half a second for the update.

The update

Once the widget has applied a decision, it pushes gtag("consent", "update", ...) with each type granted or denied by the visitor's categories, ads_data_redaction again while ad_storage is denied, and then the event consentally_consent_update for Tag Manager triggers. It does so for a choice stored on an earlier visit, a decision Global Privacy Control made, a rule that allows a category before a choice, every choice in the page view, and every page view in advanced mode. In basic mode it leaves out an update that only repeats what Google was last told, while the banner asks for a choice and, after a choice, while no Google tag or Tag Manager container has run yet to read it: so a Google tag held until the visitor allows it reads the visitor's grant first and sends that page view with consent, even after a Reject all earlier in the page view. Neither security_storage nor ads_data_redaction is a setting: the first is always granted, and the second is always set while ad_storage is denied.

Each Google consent type and what grants it
Consent typeGranted when the visitor allows
ad_storageMarketing
ad_user_dataMarketing
ad_personalizationMarketing
analytics_storageAnalytics
functionality_storageFunctional
personalization_storageFunctional
security_storageAlways granted
  • Custom categories. A custom category you give a purpose (functional, analytics or marketing) counts with it: a type is granted only when its standard category and every custom category with that purpose are allowed. A custom category without a purpose changes no consent type.

  • Global Privacy Control. What the visitor's signal denies under your rules is denied in the update too.

  • URL passthrough. With it turned on in your configuration, the first update of each page view is preceded by gtag("set", "url_passthrough", true).

  • Always on. Every decision that differs from the defaults sends the update, and no setting turns it off. On a page without Google's tags it does nothing.

Basic and advanced mode

Basic mode is the default. Google's tags are known trackers to ConsentAlly: they are held until the visitor allows them, so before a choice the only one of them that loads is your Tag Manager container, when you use one.

Advanced mode lets Google's tags load before a choice and run under the denied defaults, so they send Google cookieless pings. Only Google's own parts that read the consent state are let through: gtag.js, Google Analytics collection on Google's collection hosts, and Google Ads' routes for denied consent. Never while the visitor's Global Privacy Control signal applies, never outside an opt-in rule once marketing or a vendor that sells or shares data is refused, and never for Google Analytics or Google Ads when you list that vendor and the visitor denies it. Floodlight, AdSense, Ad Manager, Google's cookie matching and conversion pixels that read no consent state stay held.

Google uses those pings for its conversion and behavioural modelling in Google Ads and Google Analytics, which is why a store may choose advanced mode. You choose the mode in the banner editor's Consent signals section, in the dashboard or the Shopify app; it takes effect once you publish, and the publish review shows the change.

Microsoft UET and Clarity

ConsentAlly sets Microsoft's consent signals the same way, at the same moments: the default first, then an update with every decision.

JavaScript
window.uetq.push("consent", "default", { ad_storage: "denied" });window.clarity("consentv2", { ad_Storage: "denied", analytics_Storage: "denied" });

UET's ad_storage follows marketing. Clarity's ad_Storage follows marketing and its analytics_Storage follows analytics. When Clarity's script has not loaded yet, the call waits on Clarity's own queue. Both are always on, like Google's.

Check it on your page

Open your browser's console on a page of your site and list the consent commands in order:

JavaScript
window.dataLayer.filter(function (entry) {  return entry[0] === "consent";});

With the ConsentAlly tag first in the head, the first entry is the default, ahead of everything your Google tags pushed; an update follows once the widget has applied the visitor's decision. Google's Tag Assistant shows the same states for each tag.