{"action":"created","issue":{"url":"https://api.github.com/repos/Automattic/jetpack/issues/9156","repository_url":"https://api.github.com/repos/Automattic/jetpack","labels_url":"https://api.github.com/repos/Automattic/jetpack/issues/9156/labels{/name}","comments_url":"https://api.github.com/repos/Automattic/jetpack/issues/9156/comments","events_url":"https://api.github.com/repos/Automattic/jetpack/issues/9156/events","html_url":"https://github.com/Automattic/jetpack/pull/9156","id":308818248,"number":9156,"title":"Update/centralize user privacy + cookie (PR combo)","user":{"login":"jaswrks","id":1563559,"avatar_url":"https://avatars3.githubusercontent.com/u/1563559?v=4","gravatar_id":"","url":"https://api.github.com/users/jaswrks","html_url":"https://github.com/jaswrks","followers_url":"https://api.github.com/users/jaswrks/followers","following_url":"https://api.github.com/users/jaswrks/following{/other_user}","gists_url":"https://api.github.com/users/jaswrks/gists{/gist_id}","starred_url":"https://api.github.com/users/jaswrks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaswrks/subscriptions","organizations_url":"https://api.github.com/users/jaswrks/orgs","repos_url":"https://api.github.com/users/jaswrks/repos","events_url":"https://api.github.com/users/jaswrks/events{/privacy}","received_events_url":"https://api.github.com/users/jaswrks/received_events","type":"User","site_admin":false},"labels":[{"id":530839384,"url":"https://api.github.com/repos/Automattic/jetpack/labels/Tracks","name":"Tracks","color":"006b75","default":false},{"id":199076921,"url":"https://api.github.com/repos/Automattic/jetpack/labels/[Status]%20Needs%20Review","name":"[Status] Needs Review","color":"fbca04","default":false},{"id":822057521,"url":"https://api.github.com/repos/Automattic/jetpack/labels/[Type]%20GDPR","name":"[Type] GDPR","color":"c7def8","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/Automattic/jetpack/milestones/96","html_url":"https://github.com/Automattic/jetpack/milestone/96","labels_url":"https://api.github.com/repos/Automattic/jetpack/milestones/96/labels","id":3076853,"number":96,"title":"GDPR Compliant","description":"","creator":{"login":"withinboredom","id":1883296,"avatar_url":"https://avatars1.githubusercontent.com/u/1883296?v=4","gravatar_id":"","url":"https://api.github.com/users/withinboredom","html_url":"https://github.com/withinboredom","followers_url":"https://api.github.com/users/withinboredom/followers","following_url":"https://api.github.com/users/withinboredom/following{/other_user}","gists_url":"https://api.github.com/users/withinboredom/gists{/gist_id}","starred_url":"https://api.github.com/users/withinboredom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/withinboredom/subscriptions","organizations_url":"https://api.github.com/users/withinboredom/orgs","repos_url":"https://api.github.com/users/withinboredom/repos","events_url":"https://api.github.com/users/withinboredom/events{/privacy}","received_events_url":"https://api.github.com/users/withinboredom/received_events","type":"User","site_admin":false},"open_issues":7,"closed_issues":1,"state":"open","created_at":"2018-01-31T03:38:21Z","updated_at":"2018-03-27T13:36:04Z","due_on":"2018-04-30T07:00:00Z","closed_at":null},"comments":0,"created_at":"2018-03-27T04:29:14Z","updated_at":"2018-03-27T13:39:46Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/Automattic/jetpack/pulls/9156","html_url":"https://github.com/Automattic/jetpack/pull/9156","diff_url":"https://github.com/Automattic/jetpack/pull/9156.diff","patch_url":"https://github.com/Automattic/jetpack/pull/9156.patch"},"body":"Depends on https://github.com/Automattic/jetpack/pull/9142 and https://github.com/Automattic/jetpack/pull/9154 \r\n\r\n---\r\n\r\nThis PR is a fork of (and alternative to) https://github.com/Automattic/jetpack/pull/9155 (props @mattwiebe) that brings it together with the work I did previously in https://github.com/Automattic/jetpack/pull/9085 to implement `window._tkq.push( [ 'setOptOut', true|false ] )` \r\n\r\n### This PR adds the following to https://github.com/Automattic/jetpack/pull/9155\r\n\r\n- Implement the `setOptOut` command; i.e., whenever the new privacy option is changed, this PR will set or unset the opt-out cookie using `window._tkq.push( [ 'setOptOut', true|false ] )`\r\n\r\n- Make `Jetpack_Tracks_Client` in PHP aware of the `setOptOut` cookie too. If the opt-out cookie exists, do not record server-side events either.\r\n\r\n### How to test:\r\n- First merge https://github.com/Automattic/jetpack/pull/9142 and https://github.com/Automattic/jetpack/pull/9154\r\n- In a browser console, run: `localStorage.setItem( 'debug', 'dops:analytics' );`\r\n- Open the new Privacy setting described and implemented by #8993 and enhanced by this PR.\r\n- Toggle the privacy option on/off and observe browser console.\r\n- Expect to see `Pushing setOptOut: true|false`.\r\n\r\n---\r\n\r\n### Some Tests Failing at Travis\r\n\r\nIt's to be expected at this time, because this depends on https://github.com/Automattic/jetpack/pull/9142 and https://github.com/Automattic/jetpack/pull/9154 \r\n"},"comment":{"url":"https://api.github.com/repos/Automattic/jetpack/issues/comments/376528594","html_url":"https://github.com/Automattic/jetpack/pull/9156#issuecomment-376528594","issue_url":"https://api.github.com/repos/Automattic/jetpack/issues/9156","id":376528594,"user":{"login":"dereksmart","id":7129409,"avatar_url":"https://avatars1.githubusercontent.com/u/7129409?v=4","gravatar_id":"","url":"https://api.github.com/users/dereksmart","html_url":"https://github.com/dereksmart","followers_url":"https://api.github.com/users/dereksmart/followers","following_url":"https://api.github.com/users/dereksmart/following{/other_user}","gists_url":"https://api.github.com/users/dereksmart/gists{/gist_id}","starred_url":"https://api.github.com/users/dereksmart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dereksmart/subscriptions","organizations_url":"https://api.github.com/users/dereksmart/orgs","repos_url":"https://api.github.com/users/dereksmart/repos","events_url":"https://api.github.com/users/dereksmart/events{/privacy}","received_events_url":"https://api.github.com/users/dereksmart/received_events","type":"User","site_admin":false},"created_at":"2018-03-27T13:39:46Z","updated_at":"2018-03-27T13:39:46Z","author_association":"MEMBER","body":"@jaswrks can you rebase this onto master to get the changes merged in #9142 and #9154? "}}
{"actor":{"display_login":"dereksmart"}}