Skip to content

Add autoconsent rule for HubSpot cookie banner#1305

Draft
noisysocks wants to merge 1 commit intoranderson/context-eng-benchmark-v2-experimentalfrom
cursor/autoconsent-rule-hubspot-6322
Draft

Add autoconsent rule for HubSpot cookie banner#1305
noisysocks wants to merge 1 commit intoranderson/context-eng-benchmark-v2-experimentalfrom
cursor/autoconsent-rule-hubspot-6322

Conversation

@noisysocks
Copy link
Copy Markdown
Contributor

Task/Issue URL:

Description:

Adds a generic CMP rule for HubSpot's first-party cookie consent banner.

The popup appears on blog.hubspot.com, www.hubspot.com, and many other HubSpot-hosted properties. It's served by HubSpot's compliance script (https://www.hubspot.com/wt-assets/static-files/compliance/index.js) and uses a stable set of IDs (#hs-eu-cookie-confirmation, #hs-eu-confirmation-button, #hs-eu-decline-button), so a single CMP-style rule covers all sites that load it. After clicking "Decline all", the cookie __hs_cookie_cat_pref=1:false_2:false_3:false is set on .hubspot.com, which the rule uses for self-test.

Steps to test this PR:

  1. npm run build-rules
  2. npm run rule-syntax-check
  3. npm run test:lib
  4. npx playwright test tests/hubspot.spec.ts --project chrome — should pass on blog.hubspot.com and www.hubspot.com (optIn + optOut + selfTest).
Open in Web Open in Cursor 

Adds a CMP rule for HubSpot's first-party cookie consent banner,
which appears on blog.hubspot.com, www.hubspot.com, and other
HubSpot-hosted properties.

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