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

[amp-experiment] Allocate experiment variant based on CID. #3960

Merged
merged 2 commits into from
Jul 8, 2016

Conversation

lannka
Copy link
Contributor

@lannka lannka commented Jul 7, 2016

@erwinmombay
Copy link
Member

LGTM, deferring final LGTM to @jridgewell

return hasConsentPromise
.then(hasConsent => {
if (!hasConsent) {
return null;
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure we want to return null here. Imagine the user hasn't dismissed the consent notification yet, but will eventually. We're specifically not allocating this user into a variant since we can't get consent (we can't render block forever). But this is distinct from allocating the user into the null variant below (because the publisher didn't provide a full 100% distribution of variants).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point. This has been discussed during the design, and we decided to skip such an experiment on users first several visits until user has given the consent.

Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@jridgewell
Copy link
Contributor

One comment, code LGTM.

@lannka
Copy link
Contributor Author

lannka commented Jul 8, 2016

Thanks folks for the quick response!

@lannka lannka merged commit 84cbe8c into ampproject:master Jul 8, 2016
@lannka lannka deleted the sticky_experiment branch July 8, 2016 17:59
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.

None yet

3 participants