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

block amp-analytics execution is consent if not resolved #1628

Merged
merged 1 commit into from
Jan 28, 2016

Conversation

erwinmombay
Copy link
Member

Closes #1510
Closes #1313

@erwinmombay erwinmombay force-pushed the notify-analytics branch 5 times, most recently from 7834fab to 74a442c Compare January 27, 2016 23:12
* @private @const {?string}
*/
this.consentNotificationId_ = this.element
.getAttribute('data-consent-notification');
Copy link
Member

Choose a reason for hiding this comment

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

data-consent-notification-id

Copy link
Member Author

Choose a reason for hiding this comment

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

done.

@cramforce
Copy link
Member

Looks good. Please add to respective .md file.

@erwinmombay erwinmombay changed the title block amp-analytics execution is consent is not resolved [WIP] block amp-analytics execution is consent is not resolved Jan 27, 2016
@avimehta
Copy link
Contributor

@cramforce: This change does not fix the same problem for amp-pixel. Shouldn't CLIENT-ID substitution in url-replacements handle this and throw an error if client id is not generated. Then amp-analytics and amp-pixel can react on that error and discard the hit.

@erwinmombay erwinmombay changed the title [WIP] block amp-analytics execution is consent is not resolved [WIP] block amp-analytics execution is consent if not resolved Jan 27, 2016
@erwinmombay erwinmombay force-pushed the notify-analytics branch 2 times, most recently from 65cd125 to e787779 Compare January 28, 2016 09:49
@erwinmombay erwinmombay changed the title [WIP] block amp-analytics execution is consent if not resolved block amp-analytics execution is consent if not resolved Jan 28, 2016
@erwinmombay erwinmombay force-pushed the notify-analytics branch 4 times, most recently from 821e5f4 to b8744ec Compare January 28, 2016 09:53
@erwinmombay
Copy link
Member Author

@cramforce added test and document update. PTAL

/cc @avimehta

</footer>


<amp-analytics data-consent-notification-id="amp-user-notification1">
Copy link
Member

Choose a reason for hiding this comment

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

Could you trim this example to only this?

Copy link
Member Author

Choose a reason for hiding this comment

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

done. removed everything (html, css) besides logo + notification + analytics.

@cramforce
Copy link
Member

@avimehta Sorry, I missed your question.

This change (and a similar change for amp-ad) is a special mechanism to require consent on top of the base configuration. When CLIENT_ID is used directly (like in amp-pixel) users can do this already using the second argument.

@erwinmombay
Copy link
Member Author

@cramforce PTAL

<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
<link href='https://fonts.googleapis.com/css?family=Georgia|Open+Sans|Roboto' rel='stylesheet' type='text/css'>
<style amp-custom>
body {
Copy link
Member

Choose a reason for hiding this comment

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

trim CSS

Copy link
Member Author

Choose a reason for hiding this comment

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

done.

@cramforce
Copy link
Member

LGTM

@erwinmombay erwinmombay force-pushed the notify-analytics branch 4 times, most recently from 9fe101d to 2d26fc7 Compare January 28, 2016 21:48
erwinmombay added a commit that referenced this pull request Jan 28, 2016
block amp-analytics execution is consent if not resolved
@erwinmombay erwinmombay merged commit ed5e8bc into ampproject:master Jan 28, 2016
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.

5 participants