Skip to content
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

Load Cookie With Consent #123

Merged
merged 2 commits into from
Jan 12, 2021

Conversation

mmoschovas
Copy link
Contributor

@mmoschovas mmoschovas commented Oct 8, 2020

Created alternate to load-cookie.html named load-cookie-with-consent.html. This will load the new cookieSyncWithConsent.js script which will postMessage the parent window for GDPR consent data. If data is returned before the timeout, the data is parsed to retrieve the gdprApplies and consentString values, which are then set in the data of the Prebid Server request. If the timeout expires prior to data returning, the defaultGdprScope setting will determine if the user sync should still run or not. The below fields can be passed in the load-cookie-with-consent.html URL string.

defaultGdprScope : accepted values 0 or 1, default 1
timeout : integer, default 10000

i.e. The below example would set the timeout to 500ms and allow sync if timeout is reached and GDPR data is not returned
...load-cookie-with-consent.html?max_sync_count=5&timeout=500&defaultGdprScope=0

…html. This will load the cookieSyncWithConsent.js script which will postMessage the parent window for GDPR consent data.
@bretg
Copy link
Contributor

bretg commented Oct 14, 2020

Thanks @mmoschovas . For the record, this is the code for #114

@bretg
Copy link
Contributor

bretg commented Oct 14, 2020

I'll take a cut at the docs.

Copy link
Contributor

@Fawke Fawke left a comment

Choose a reason for hiding this comment

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

Tested the example amp page on a few browsers, seems to be working fine. Just had one small issue, please check the line comment.

return value;
}

/**
Copy link
Contributor

Choose a reason for hiding this comment

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

The comment and the code doesn't add up.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated comment

Copy link
Contributor

@Fawke Fawke left a comment

Choose a reason for hiding this comment

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

LGTM.

@bretg
Copy link
Contributor

bretg commented Oct 29, 2020

docs PR prebid/prebid.github.io#2456

@harpere harpere added the LGTM label Nov 24, 2020
@jsnellbaker jsnellbaker merged commit 718abce into prebid:master Jan 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants