-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
✨ Google Ad Manager Publisher first-party IDs #40249
base: main
Are you sure you want to change the base?
Conversation
@glevitzky do you know if the failing unit tests are related to this change?
|
* iframe. Exposed as own function to ease unit testing. (It's near | ||
* impossible to simulate the postmessage coming from the creative iframe in | ||
* unit test environments). | ||
* @param {Event} event |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should probably be {!Event}
* @param {!Window} win | ||
* @return {boolean} | ||
*/ | ||
export function canSetCookie(win) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
non blocking, but can this value be memoized in some fashion?
would be happy with a comment/note if yes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm sure it's a tiny edge case, but strictly speaking, a user can disable cookies on their browser at any time, invalidating our previously memoized value.
Test failures look unrelated. Running |
Do we want to do a design review for this? |
Addresses #40248.
Implements both cookie writing and reading components described in the linked I2I. In particular, we will set the specified cookies on the ad response HTTP header, and add those cookies to ad requests when available. We also add here some ads utility functions for verifying user consent for cookies, and some global cookie utility functions for checking whether setting cookies is allowed.
This change on its own is mostly a no-op, as serving is not yet setup to send to the new HTTP cookie header.