Skip to content

Added consent gating to the Advertising component to ensure no advertising cookies are written before user consent is resolved.#1442

Merged
carterworks merged 13 commits intomainfrom
advertising_cja_integration2
Feb 11, 2026
Merged

Added consent gating to the Advertising component to ensure no advertising cookies are written before user consent is resolved.#1442
carterworks merged 13 commits intomainfrom
advertising_cja_integration2

Conversation

@adhir111
Copy link
Contributor

@adhir111 adhir111 commented Feb 10, 2026

Description

  • createComponent.js —synchronous consent.current() check on onBeforeEvent to skip ad ID resolution when consent is not "in"
  • index.js — pass consent dependency through to createComponent

Related Issue

Pre-consent cookie writes in the Advertising component.

Motivation and Context

Dont resolve ad ids on sendEvent commands

Checklist:

  • I have signed the Adobe Open Source CLA or I'm an Adobe employee.
  • I have made any necessary test changes and all tests pass.
  • I have run the Sandbox successfully.
  • I have added a Changeset (pnpm changeset) or it is not necessary because this PR is not consumer-facing.

updated the skipped tests for helper.js
in componentRegistered hook , for viewthru : return promise for click thru advertising call , for viewthru case fire and forget
Add timestamp in payload of enrichment calls
Move LAST_CLICK_COOKIE_KEY cookie write from clickThroughHandler into
createAdConversionHandler.trackAdConversion(), after consent.awaitConsent()
resolves. This ensures no ad-tracking cookies (skwcid/efid) are set
without user consent.

Changes:
- clickThroughHandler: removed pre-consent LAST_CLICK_COOKIE_KEY write,
  pass skwcid/efid through to trackAdConversion()
- createAdConversionHandler: accept cookieManager, write click cookie
  only after consent is granted
- index.js: pass cookieManager to createAdConversionHandler (1-line change)
@changeset-bot
Copy link

changeset-bot bot commented Feb 10, 2026

🦋 Changeset detected

Latest commit: ab0b821

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Collaborator

@carterworks carterworks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. In your CLI, please run pnpm changeset, select the @adobe/alloy package, and write what you want to go into the release notes.
  2. Please write a new PR description - what you wrote in this one seems like a copy-paste of #1435 and I don't know what the motivation or details for this issue are.

@adhir111
Copy link
Contributor Author

  1. In your CLI, please run pnpm changeset, select the @adobe/alloy package, and write what you want to go into the release notes.
  2. Please write a new PR description - what you wrote in this one seems like a copy-paste of Added consent gating for the Advertising component #1435 and I don't know what the motivation or details for this issue are.
  1. In your CLI, please run pnpm changeset, select the @adobe/alloy package, and write what you want to go into the release notes.
  2. Please write a new PR description - what you wrote in this one seems like a copy-paste of Added consent gating for the Advertising component #1435 and I don't know what the motivation or details for this issue are.

Updated description and added pnpm note

@carterworks carterworks changed the title Advertising cja integration2 Added consent gating to the Advertising component to ensure no advertising cookies are written before user consent is resolved. Feb 10, 2026
@carterworks carterworks merged commit e27bf44 into main Feb 11, 2026
6 checks passed
@carterworks carterworks deleted the advertising_cja_integration2 branch February 11, 2026 15:49
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.

2 participants