Skip to content

Conversation

@roomote
Copy link
Contributor

@roomote roomote bot commented Nov 3, 2025

Implements Google Consent Mode v2 with cookieless pings for Google Ads tags on the marketing website.

Changes

  • Set consent defaults before gtag.js loads (required for Consent Mode v2)
  • Enable cookieless pings with url_passthrough parameter
  • Implement consent update logic for all consent categories (ad_storage, ad_user_data, ad_personalization, analytics_storage, etc.)
  • Support both granted and denied consent states
  • Scripts now load unconditionally (required for cookieless mode to work)
  • Add TypeScript types for Consent Mode v2 API

Key Features

Cookieless Pings: When users decline cookies, Google Ads can still send conversion data without cookies using the url_passthrough parameter. This allows for privacy-friendly conversion tracking.

Consent Mode v2 Compliance: Implements all required consent types for Google Consent Mode v2:

  • ad_storage - Storage for ads
  • ad_user_data - Consent for sending user data to Google for advertising
  • ad_personalization - Consent for personalized ads
  • analytics_storage - Storage for analytics
  • functionality_storage - Storage for functionality
  • personalization_storage - Storage for personalization
  • security_storage - Always granted for security purposes

Privacy-First Approach: All consent types default to "denied" until user explicitly accepts cookies, maintaining GDPR compliance.

Testing

  • ✅ TypeScript compilation passed
  • ✅ ESLint validation passed
  • ✅ All existing tests passed
  • ✅ Verified consent default/update flow

Related

Addresses Slack request to update Google Ads tags to use advanced Google Consent Mode v2 with cookieless pings while making minimal changes.


Important

Implements Google Consent Mode v2 with cookieless pings and TypeScript types in google-analytics-provider.tsx.

  • Behavior:
    • Implements Google Consent Mode v2 with cookieless pings in google-analytics-provider.tsx.
    • Sets consent defaults before gtag.js loads, enabling url_passthrough for cookieless pings.
    • Updates consent states for categories like ad_storage, ad_user_data, and analytics_storage.
    • Scripts load unconditionally to support cookieless mode.
  • TypeScript:
    • Adds types for Consent Mode v2 API, including ConsentState, ConsentParams, and GtagArgs.

This description was created by Ellipsis for b7d5bd3. You can customize this summary. It will automatically update as commits are pushed.

- Add consent defaults before gtag.js loads (required for Consent Mode v2)
- Enable cookieless pings with url_passthrough for Google Ads
- Implement consent update logic for all consent categories
- Support both granted and denied consent states
- Maintain backward compatibility with existing consent manager
@roomote roomote bot requested review from cte, jr and mrubens as code owners November 3, 2025 01:51
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. Enhancement New feature or request labels Nov 3, 2025
@roomote
Copy link
Contributor Author

roomote bot commented Nov 3, 2025

See this task on Roo Code Cloud

All issues resolved. PR is ready to merge.

  • Fix useEffect dependency array causing unnecessary consent re-initialization
Previous Reviews

Mention @roomote in a comment to trigger your PR Fixer agent and make changes to this pull request.

@github-actions
Copy link
Contributor

github-actions bot commented Nov 3, 2025

🚀 Preview deployed!

Your changes have been deployed to Vercel:

Preview URL: https://roo-code-website-aaue8ata5-roo-code.vercel.app

This preview will be updated automatically when you push new commits to this PR.

@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Nov 3, 2025
@dleffel
Copy link
Collaborator

dleffel commented Nov 3, 2025

@roomote address all PR feedback.

@roomote
Copy link
Contributor Author

roomote bot commented Nov 3, 2025

See this task on Roo Code Cloud

Fixed the reported issue. All local checks passed.

View commit | Revert commit

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Nov 3, 2025
@dleffel dleffel merged commit 5fb36d9 into main Nov 3, 2025
16 checks passed
@dleffel dleffel deleted the feature/google-consent-mode-v2 branch November 3, 2025 04:59
@github-project-automation github-project-automation bot moved this from Triage to Done in Roo Code Roadmap Nov 3, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Nov 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Enhancement New feature or request Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. lgtm This PR has been approved by a maintainer size:L This PR changes 100-499 lines, ignoring generated files.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants