Skip to main content
Checks for Google Consent Mode v2 implementation
Rule IDanalytics/consent-mode
CategoryAnalytics
ScopePer-page
Severityinfo
Weight4/10

Solution

Google Consent Mode v2 is required for Google Ads in the EU/EEA (March 2024). It allows Google tags to adjust behavior based on user consent. Implement with gtag('consent', 'default', {...}) before loading Google tags. Set ad_storage, analytics_storage, ad_user_data, and ad_personalization. Update on user consent.

Enable / Disable

Disable this rule

squirrel.toml
[rules]
disable = ["analytics/consent-mode"]

Disable all Analytics rules

squirrel.toml
[rules]
disable = ["analytics/*"]

Enable only this rule

squirrel.toml
[rules]
enable = ["analytics/consent-mode"]
disable = ["*"]