Skip to content

Add autoconsent rule for ring.com#1311

Draft
noisysocks wants to merge 1 commit intoranderson/context-eng-benchmark-v2-experimentalfrom
cursor/ring-com-cookie-consent-31c8
Draft

Add autoconsent rule for ring.com#1311
noisysocks wants to merge 1 commit intoranderson/context-eng-benchmark-v2-experimentalfrom
cursor/ring-com-cookie-consent-31c8

Conversation

@noisysocks
Copy link
Copy Markdown
Contributor

Summary

Adds a site-specific autoconsent rule for ring.com (and country sub-sites such as en-uk.ring.com).

CMP

Ring uses a custom in-house consent manager loaded from
d39xvdj9d5ntm1.cloudfront.net/common/.../consent-manager*.js. The banner DOM is
identifiable by the .consent-banner container, with buttons:

  • button.consent--accept – accept all
  • button.consent--reject – reject all (only rendered in EU/GDPR variant)
  • button.consent--manage – open settings modal

In the US (and other non-GDPR regions) the banner only shows "Got it" + "Manage Settings",
so opt-out has to go through the modal: open settings, toggle off the per-third-party
.check-icon rows in non-essential buckets, then click .consent-save.

The CMP writes a privacy-banner-clicked=true cookie on any decision (accept, reject, or
save), used as the self-test signal.

Rule flow

  • prehideSelectors / detectCmp / detectPopup use .consent-banner.
  • optIn clicks button.consent--accept.
  • optOut:
    • If a button.consent--reject is present (GDPR), click it.
    • Otherwise open the manage modal, click each .third-party.active .check-icon
      inside non-essential .consent-bucket rows (optional, in case the modal arrives
      pre-toggled-off), then click .consent-save.
  • runContext.urlPattern scopes the rule to *.ring.com.

Verification

  • npm run rule-syntax-check – passed
  • npm run build-rules – passed
  • npm run test:lib – 2946 passed
  • npm run lint-fix – clean
  • npx playwright test --project=chrome tests/ring-com.spec.ts – all 4 tests passed
    (US + UK, optIn + optOut, with selfTestResult: true).
Open in Web Open in Cursor 

Co-authored-by: Robert Anderson <robert@noisysocks.com>
@daxtheduck
Copy link
Copy Markdown
Collaborator

CI run finished. Artifacts ZIP for the review tool

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants