{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla/blurts-server/pulls/comments/194482871","pull_request_review_id":127659412,"id":194482871,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NDQ4Mjg3MQ==","diff_hunk":"@@ -0,0 +1,48 @@\n+/* eslint-env browser */\n+\"use strict\";\n+\n+/* \n+\tRespect user privacy settings and honor user privacy choices.\n+\tFrom Schalk Neethling at https://github.com/schalkneethling/dnt-helper */\n+\t\n+const trackingProtection = {};\n+trackingProtection.enabled = function(dnt, ua){\n+\twindow.dataLayer = window.dataLayer || [];\n+\tlet userPrivacySettings = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;\n+\tconst userAgent = ua || navigator.userAgent;\n+\tconst anomalousWinVersions = [\"Windows NT 6.1\", \"Windows NT 6.2\", \"Windows NT 6.3\"];\n+\tconst fxMatch = userAgent.match(/Firefox\\/(\\d+)/);\n+\tconst ieRegEx = /MSIE|Trident/i;\n+\tconst isIE = ieRegEx.test(userAgent);\n+\tconst platform = userAgent.match(/Windows.+?(?=;)/g);\n+\tif(isIE&&typeof Array.prototype.indexOf !== \"function\") {\n+\t\treturn false;\n+\t} \n+\telse if(fxMatch&&parseInt(fxMatch[1],10)<32) {\n+\t\tuserPrivacySettings=\"Unspecified\";\n+\t} \n+\telse if(isIE && platform&&anomalousWinVersions.indexOf(platform.toString()) !== -1) {\n+\t\tuserPrivacySettings=\"Unspecified\";\n+\t}\n+\telse {\n+\t\tuserPrivacySettings = {\n+\t\t0 : \"Disabled\",\n+\t\t1 : \"Enabled\",\n+\t\t}[userPrivacySettings] || \"Unspecified\";}","path":"public/js/tracking_protection.js","position":31,"original_position":31,"commit_id":"b90293fd6adab0631fffc0b864add55fa03c68bc","original_commit_id":"b90293fd6adab0631fffc0b864add55fa03c68bc","user":{"login":"pdehaan","id":557895,"node_id":"MDQ6VXNlcjU1Nzg5NQ==","avatar_url":"https://avatars2.githubusercontent.com/u/557895?v=4","gravatar_id":"","url":"https://api.github.com/users/pdehaan","html_url":"https://github.com/pdehaan","followers_url":"https://api.github.com/users/pdehaan/followers","following_url":"https://api.github.com/users/pdehaan/following{/other_user}","gists_url":"https://api.github.com/users/pdehaan/gists{/gist_id}","starred_url":"https://api.github.com/users/pdehaan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pdehaan/subscriptions","organizations_url":"https://api.github.com/users/pdehaan/orgs","repos_url":"https://api.github.com/users/pdehaan/repos","events_url":"https://api.github.com/users/pdehaan/events{/privacy}","received_events_url":"https://api.github.com/users/pdehaan/received_events","type":"User","site_admin":false},"body":"Actually, why bother with Unspecified at all since we only ever check if it equals Enabled below?","created_at":"2018-06-11T17:27:13Z","updated_at":"2018-06-11T17:34:17Z","html_url":"https://github.com/mozilla/blurts-server/pull/185#discussion_r194482871","pull_request_url":"https://api.github.com/repos/mozilla/blurts-server/pulls/185","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/mozilla/blurts-server/pulls/comments/194482871"},"html":{"href":"https://github.com/mozilla/blurts-server/pull/185#discussion_r194482871"},"pull_request":{"href":"https://api.github.com/repos/mozilla/blurts-server/pulls/185"}},"in_reply_to_id":194481892},"pull_request":{"url":"https://api.github.com/repos/mozilla/blurts-server/pulls/185","id":194028241,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk0MDI4MjQx","html_url":"https://github.com/mozilla/blurts-server/pull/185","diff_url":"https://github.com/mozilla/blurts-server/pull/185.diff","patch_url":"https://github.com/mozilla/blurts-server/pull/185.patch","issue_url":"https://api.github.com/repos/mozilla/blurts-server/issues/185","number":185,"state":"open","locked":false,"title":"Google Analytics ","user":{"login":"lesleyjanenorton","id":22355127,"node_id":"MDQ6VXNlcjIyMzU1MTI3","avatar_url":"https://avatars1.githubusercontent.com/u/22355127?v=4","gravatar_id":"","url":"https://api.github.com/users/lesleyjanenorton","html_url":"https://github.com/lesleyjanenorton","followers_url":"https://api.github.com/users/lesleyjanenorton/followers","following_url":"https://api.github.com/users/lesleyjanenorton/following{/other_user}","gists_url":"https://api.github.com/users/lesleyjanenorton/gists{/gist_id}","starred_url":"https://api.github.com/users/lesleyjanenorton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lesleyjanenorton/subscriptions","organizations_url":"https://api.github.com/users/lesleyjanenorton/orgs","repos_url":"https://api.github.com/users/lesleyjanenorton/repos","events_url":"https://api.github.com/users/lesleyjanenorton/events{/privacy}","received_events_url":"https://api.github.com/users/lesleyjanenorton/received_events","type":"User","site_admin":false},"body":"hey guys, apologies in advance because I know it's All Hands and this is a bunch to look over!  \r\n\r\nBigger Things: \r\n- Added 'tracking-projections.js' that checks for user privacy settings and installs google analytics if tracking protection is not enabled.\r\n- Added google analytics event handlers in 'monitor.js' (these could/maybe should be moved into their own file?).\r\n- Modified helmet settings to accommodate google analytics.\r\n\r\nLittle(r) Things:\r\n- Condensed Sign up button partials (button and text are no longer repeated).\r\n- Minified Mozilla logo\r\n- Moved false door html into it's own partial and out of monitor.js","created_at":"2018-06-11T16:00:20Z","updated_at":"2018-06-11T17:34:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ed7b1cc4660363da1c5452ea15b354829a905226","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/mozilla/blurts-server/pulls/185/commits","review_comments_url":"https://api.github.com/repos/mozilla/blurts-server/pulls/185/comments","review_comment_url":"https://api.github.com/repos/mozilla/blurts-server/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mozilla/blurts-server/issues/185/comments","statuses_url":"https://api.github.com/repos/mozilla/blurts-server/statuses/b90293fd6adab0631fffc0b864add55fa03c68bc","head":{"label":"mozilla:metrics","ref":"metrics","sha":"b90293fd6adab0631fffc0b864add55fa03c68bc","user":{"login":"mozilla","id":131524,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzMTUyNA==","avatar_url":"https://avatars2.githubusercontent.com/u/131524?v=4","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"repo":{"id":109599429,"node_id":"MDEwOlJlcG9zaXRvcnkxMDk1OTk0Mjk=","name":"blurts-server","full_name":"mozilla/blurts-server","owner":{"login":"mozilla","id":131524,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzMTUyNA==","avatar_url":"https://avatars2.githubusercontent.com/u/131524?v=4","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla/blurts-server","description":"Prototyping for upcoming Breach Alerts feature in Firefox","fork":false,"url":"https://api.github.com/repos/mozilla/blurts-server","forks_url":"https://api.github.com/repos/mozilla/blurts-server/forks","keys_url":"https://api.github.com/repos/mozilla/blurts-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla/blurts-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla/blurts-server/teams","hooks_url":"https://api.github.com/repos/mozilla/blurts-server/hooks","issue_events_url":"https://api.github.com/repos/mozilla/blurts-server/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla/blurts-server/events","assignees_url":"https://api.github.com/repos/mozilla/blurts-server/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla/blurts-server/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla/blurts-server/tags","blobs_url":"https://api.github.com/repos/mozilla/blurts-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla/blurts-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla/blurts-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla/blurts-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla/blurts-server/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla/blurts-server/languages","stargazers_url":"https://api.github.com/repos/mozilla/blurts-server/stargazers","contributors_url":"https://api.github.com/repos/mozilla/blurts-server/contributors","subscribers_url":"https://api.github.com/repos/mozilla/blurts-server/subscribers","subscription_url":"https://api.github.com/repos/mozilla/blurts-server/subscription","commits_url":"https://api.github.com/repos/mozilla/blurts-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla/blurts-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla/blurts-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla/blurts-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla/blurts-server/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla/blurts-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla/blurts-server/merges","archive_url":"https://api.github.com/repos/mozilla/blurts-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla/blurts-server/downloads","issues_url":"https://api.github.com/repos/mozilla/blurts-server/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla/blurts-server/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla/blurts-server/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla/blurts-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla/blurts-server/labels{/name}","releases_url":"https://api.github.com/repos/mozilla/blurts-server/releases{/id}","deployments_url":"https://api.github.com/repos/mozilla/blurts-server/deployments","created_at":"2017-11-05T17:13:37Z","updated_at":"2018-06-08T22:41:20Z","pushed_at":"2018-06-11T16:00:21Z","git_url":"git://github.com/mozilla/blurts-server.git","ssh_url":"git@github.com:mozilla/blurts-server.git","clone_url":"https://github.com/mozilla/blurts-server.git","svn_url":"https://github.com/mozilla/blurts-server","homepage":"https://fx-breach-alerts.herokuapp.com/","size":3785,"stargazers_count":95,"watchers_count":95,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":16,"mirror_url":null,"archived":false,"open_issues_count":47,"license":{"key":"mpl-2.0","name":"Mozilla Public License 2.0","spdx_id":"MPL-2.0","url":"https://api.github.com/licenses/mpl-2.0","node_id":"MDc6TGljZW5zZTE0"},"forks":16,"open_issues":47,"watchers":95,"default_branch":"master"}},"base":{"label":"mozilla:master","ref":"master","sha":"4b66776478e3e1f0817e47fccbf01f1e131b36a5","user":{"login":"mozilla","id":131524,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzMTUyNA==","avatar_url":"https://avatars2.githubusercontent.com/u/131524?v=4","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"repo":{"id":109599429,"node_id":"MDEwOlJlcG9zaXRvcnkxMDk1OTk0Mjk=","name":"blurts-server","full_name":"mozilla/blurts-server","owner":{"login":"mozilla","id":131524,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEzMTUyNA==","avatar_url":"https://avatars2.githubusercontent.com/u/131524?v=4","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla/blurts-server","description":"Prototyping for upcoming Breach Alerts feature in Firefox","fork":false,"url":"https://api.github.com/repos/mozilla/blurts-server","forks_url":"https://api.github.com/repos/mozilla/blurts-server/forks","keys_url":"https://api.github.com/repos/mozilla/blurts-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla/blurts-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla/blurts-server/teams","hooks_url":"https://api.github.com/repos/mozilla/blurts-server/hooks","issue_events_url":"https://api.github.com/repos/mozilla/blurts-server/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla/blurts-server/events","assignees_url":"https://api.github.com/repos/mozilla/blurts-server/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla/blurts-server/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla/blurts-server/tags","blobs_url":"https://api.github.com/repos/mozilla/blurts-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla/blurts-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla/blurts-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla/blurts-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla/blurts-server/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla/blurts-server/languages","stargazers_url":"https://api.github.com/repos/mozilla/blurts-server/stargazers","contributors_url":"https://api.github.com/repos/mozilla/blurts-server/contributors","subscribers_url":"https://api.github.com/repos/mozilla/blurts-server/subscribers","subscription_url":"https://api.github.com/repos/mozilla/blurts-server/subscription","commits_url":"https://api.github.com/repos/mozilla/blurts-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla/blurts-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla/blurts-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla/blurts-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla/blurts-server/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla/blurts-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla/blurts-server/merges","archive_url":"https://api.github.com/repos/mozilla/blurts-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla/blurts-server/downloads","issues_url":"https://api.github.com/repos/mozilla/blurts-server/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla/blurts-server/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla/blurts-server/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla/blurts-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla/blurts-server/labels{/name}","releases_url":"https://api.github.com/repos/mozilla/blurts-server/releases{/id}","deployments_url":"https://api.github.com/repos/mozilla/blurts-server/deployments","created_at":"2017-11-05T17:13:37Z","updated_at":"2018-06-08T22:41:20Z","pushed_at":"2018-06-11T16:00:21Z","git_url":"git://github.com/mozilla/blurts-server.git","ssh_url":"git@github.com:mozilla/blurts-server.git","clone_url":"https://github.com/mozilla/blurts-server.git","svn_url":"https://github.com/mozilla/blurts-server","homepage":"https://fx-breach-alerts.herokuapp.com/","size":3785,"stargazers_count":95,"watchers_count":95,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":16,"mirror_url":null,"archived":false,"open_issues_count":47,"license":{"key":"mpl-2.0","name":"Mozilla Public License 2.0","spdx_id":"MPL-2.0","url":"https://api.github.com/licenses/mpl-2.0","node_id":"MDc6TGljZW5zZTE0"},"forks":16,"open_issues":47,"watchers":95,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla/blurts-server/pulls/185"},"html":{"href":"https://github.com/mozilla/blurts-server/pull/185"},"issue":{"href":"https://api.github.com/repos/mozilla/blurts-server/issues/185"},"comments":{"href":"https://api.github.com/repos/mozilla/blurts-server/issues/185/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla/blurts-server/pulls/185/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla/blurts-server/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mozilla/blurts-server/pulls/185/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla/blurts-server/statuses/b90293fd6adab0631fffc0b864add55fa03c68bc"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"pdehaan"}}