{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla/addons-frontend/pulls/comments/65729504","id":65729504,"diff_hunk":"@@ -0,0 +1,87 @@\n+/* eslint-disable no-underscore-dangle */\n+\n+import config from 'config';\n+import log from 'core/logger';\n+\n+\n+export class Tracking {\n+\n+  constructor({trackingId, trackingEnabled, _log = log} = {}) {\n+    if (typeof window === 'undefined') {\n+      return;\n+    }\n+    this._log = _log;\n+    this.id = trackingId;\n+    this.enabled = trackingEnabled && trackingId;\n+    this.logPrefix = `[GA: ${trackingEnabled ? 'ON' : 'OFF'}]`;","path":"src/core/tracking.js","position":16,"original_position":16,"commit_id":"5b439f48f696d2d879336b49ee4a0246c3ab2db5","original_commit_id":"5b439f48f696d2d879336b49ee4a0246c3ab2db5","user":{"login":"mstriemer","id":211578,"avatar_url":"https://avatars.githubusercontent.com/u/211578?v=3","gravatar_id":"","url":"https://api.github.com/users/mstriemer","html_url":"https://github.com/mstriemer","followers_url":"https://api.github.com/users/mstriemer/followers","following_url":"https://api.github.com/users/mstriemer/following{/other_user}","gists_url":"https://api.github.com/users/mstriemer/gists{/gist_id}","starred_url":"https://api.github.com/users/mstriemer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mstriemer/subscriptions","organizations_url":"https://api.github.com/users/mstriemer/orgs","repos_url":"https://api.github.com/users/mstriemer/repos","events_url":"https://api.github.com/users/mstriemer/events{/privacy}","received_events_url":"https://api.github.com/users/mstriemer/received_events","type":"User","site_admin":false},"body":"Should this instead use `this.enabled` since that's slightly different and what we're checking in other places?","created_at":"2016-06-03T15:45:01Z","updated_at":"2016-06-03T15:45:01Z","html_url":"https://github.com/mozilla/addons-frontend/pull/513#discussion_r65729504","pull_request_url":"https://api.github.com/repos/mozilla/addons-frontend/pulls/513","_links":{"self":{"href":"https://api.github.com/repos/mozilla/addons-frontend/pulls/comments/65729504"},"html":{"href":"https://github.com/mozilla/addons-frontend/pull/513#discussion_r65729504"},"pull_request":{"href":"https://api.github.com/repos/mozilla/addons-frontend/pulls/513"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla/addons-frontend/pulls/513","id":72409221,"html_url":"https://github.com/mozilla/addons-frontend/pull/513","diff_url":"https://github.com/mozilla/addons-frontend/pull/513.diff","patch_url":"https://github.com/mozilla/addons-frontend/pull/513.patch","issue_url":"https://api.github.com/repos/mozilla/addons-frontend/issues/513","number":513,"state":"open","locked":false,"title":"Add tracking to disco pane","user":{"login":"muffinresearch","id":1514,"avatar_url":"https://avatars.githubusercontent.com/u/1514?v=3","gravatar_id":"","url":"https://api.github.com/users/muffinresearch","html_url":"https://github.com/muffinresearch","followers_url":"https://api.github.com/users/muffinresearch/followers","following_url":"https://api.github.com/users/muffinresearch/following{/other_user}","gists_url":"https://api.github.com/users/muffinresearch/gists{/gist_id}","starred_url":"https://api.github.com/users/muffinresearch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/muffinresearch/subscriptions","organizations_url":"https://api.github.com/users/muffinresearch/orgs","repos_url":"https://api.github.com/users/muffinresearch/repos","events_url":"https://api.github.com/users/muffinresearch/events{/privacy}","received_events_url":"https://api.github.com/users/muffinresearch/received_events","type":"User","site_admin":false},"body":"Fixes #41 \r\n\r\n* Adds tracking lib \r\n* Uses async setup as per GA docs\r\n* Adds CSP config (we might need more than this if beacons go to other hosts).\r\n* preventDefault added (I was seeing 2 beacons fired) this probably meant installs were kicked off twice too.\r\n* adds the install and uninstall events.\r\n","created_at":"2016-06-02T20:09:49Z","updated_at":"2016-06-03T15:45:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"14334e1eb2623f35e26d27535a1c587888016a33","assignee":{"login":"mstriemer","id":211578,"avatar_url":"https://avatars.githubusercontent.com/u/211578?v=3","gravatar_id":"","url":"https://api.github.com/users/mstriemer","html_url":"https://github.com/mstriemer","followers_url":"https://api.github.com/users/mstriemer/followers","following_url":"https://api.github.com/users/mstriemer/following{/other_user}","gists_url":"https://api.github.com/users/mstriemer/gists{/gist_id}","starred_url":"https://api.github.com/users/mstriemer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mstriemer/subscriptions","organizations_url":"https://api.github.com/users/mstriemer/orgs","repos_url":"https://api.github.com/users/mstriemer/repos","events_url":"https://api.github.com/users/mstriemer/events{/privacy}","received_events_url":"https://api.github.com/users/mstriemer/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/mozilla/addons-frontend/pulls/513/commits","review_comments_url":"https://api.github.com/repos/mozilla/addons-frontend/pulls/513/comments","review_comment_url":"https://api.github.com/repos/mozilla/addons-frontend/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mozilla/addons-frontend/issues/513/comments","statuses_url":"https://api.github.com/repos/mozilla/addons-frontend/statuses/5b439f48f696d2d879336b49ee4a0246c3ab2db5","head":{"label":"muffinresearch:add-tracking-to-disco","ref":"add-tracking-to-disco","sha":"5b439f48f696d2d879336b49ee4a0246c3ab2db5","user":{"login":"muffinresearch","id":1514,"avatar_url":"https://avatars.githubusercontent.com/u/1514?v=3","gravatar_id":"","url":"https://api.github.com/users/muffinresearch","html_url":"https://github.com/muffinresearch","followers_url":"https://api.github.com/users/muffinresearch/followers","following_url":"https://api.github.com/users/muffinresearch/following{/other_user}","gists_url":"https://api.github.com/users/muffinresearch/gists{/gist_id}","starred_url":"https://api.github.com/users/muffinresearch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/muffinresearch/subscriptions","organizations_url":"https://api.github.com/users/muffinresearch/orgs","repos_url":"https://api.github.com/users/muffinresearch/repos","events_url":"https://api.github.com/users/muffinresearch/events{/privacy}","received_events_url":"https://api.github.com/users/muffinresearch/received_events","type":"User","site_admin":false},"repo":{"id":52104378,"name":"addons-frontend","full_name":"muffinresearch/addons-frontend","owner":{"login":"muffinresearch","id":1514,"avatar_url":"https://avatars.githubusercontent.com/u/1514?v=3","gravatar_id":"","url":"https://api.github.com/users/muffinresearch","html_url":"https://github.com/muffinresearch","followers_url":"https://api.github.com/users/muffinresearch/followers","following_url":"https://api.github.com/users/muffinresearch/following{/other_user}","gists_url":"https://api.github.com/users/muffinresearch/gists{/gist_id}","starred_url":"https://api.github.com/users/muffinresearch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/muffinresearch/subscriptions","organizations_url":"https://api.github.com/users/muffinresearch/orgs","repos_url":"https://api.github.com/users/muffinresearch/repos","events_url":"https://api.github.com/users/muffinresearch/events{/privacy}","received_events_url":"https://api.github.com/users/muffinresearch/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/muffinresearch/addons-frontend","description":"Front-end infrastructure and code to complement mozilla/addons-server","fork":true,"url":"https://api.github.com/repos/muffinresearch/addons-frontend","forks_url":"https://api.github.com/repos/muffinresearch/addons-frontend/forks","keys_url":"https://api.github.com/repos/muffinresearch/addons-frontend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/muffinresearch/addons-frontend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/muffinresearch/addons-frontend/teams","hooks_url":"https://api.github.com/repos/muffinresearch/addons-frontend/hooks","issue_events_url":"https://api.github.com/repos/muffinresearch/addons-frontend/issues/events{/number}","events_url":"https://api.github.com/repos/muffinresearch/addons-frontend/events","assignees_url":"https://api.github.com/repos/muffinresearch/addons-frontend/assignees{/user}","branches_url":"https://api.github.com/repos/muffinresearch/addons-frontend/branches{/branch}","tags_url":"https://api.github.com/repos/muffinresearch/addons-frontend/tags","blobs_url":"https://api.github.com/repos/muffinresearch/addons-frontend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/muffinresearch/addons-frontend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/muffinresearch/addons-frontend/git/refs{/sha}","trees_url":"https://api.github.com/repos/muffinresearch/addons-frontend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/muffinresearch/addons-frontend/statuses/{sha}","languages_url":"https://api.github.com/repos/muffinresearch/addons-frontend/languages","stargazers_url":"https://api.github.com/repos/muffinresearch/addons-frontend/stargazers","contributors_url":"https://api.github.com/repos/muffinresearch/addons-frontend/contributors","subscribers_url":"https://api.github.com/repos/muffinresearch/addons-frontend/subscribers","subscription_url":"https://api.github.com/repos/muffinresearch/addons-frontend/subscription","commits_url":"https://api.github.com/repos/muffinresearch/addons-frontend/commits{/sha}","git_commits_url":"https://api.github.com/repos/muffinresearch/addons-frontend/git/commits{/sha}","comments_url":"https://api.github.com/repos/muffinresearch/addons-frontend/comments{/number}","issue_comment_url":"https://api.github.com/repos/muffinresearch/addons-frontend/issues/comments{/number}","contents_url":"https://api.github.com/repos/muffinresearch/addons-frontend/contents/{+path}","compare_url":"https://api.github.com/repos/muffinresearch/addons-frontend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/muffinresearch/addons-frontend/merges","archive_url":"https://api.github.com/repos/muffinresearch/addons-frontend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/muffinresearch/addons-frontend/downloads","issues_url":"https://api.github.com/repos/muffinresearch/addons-frontend/issues{/number}","pulls_url":"https://api.github.com/repos/muffinresearch/addons-frontend/pulls{/number}","milestones_url":"https://api.github.com/repos/muffinresearch/addons-frontend/milestones{/number}","notifications_url":"https://api.github.com/repos/muffinresearch/addons-frontend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/muffinresearch/addons-frontend/labels{/name}","releases_url":"https://api.github.com/repos/muffinresearch/addons-frontend/releases{/id}","deployments_url":"https://api.github.com/repos/muffinresearch/addons-frontend/deployments","created_at":"2016-02-19T17:26:17Z","updated_at":"2016-03-11T16:08:46Z","pushed_at":"2016-06-03T14:44:07Z","git_url":"git://github.com/muffinresearch/addons-frontend.git","ssh_url":"git@github.com:muffinresearch/addons-frontend.git","clone_url":"https://github.com/muffinresearch/addons-frontend.git","svn_url":"https://github.com/muffinresearch/addons-frontend","homepage":null,"size":65890,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mozilla:master","ref":"master","sha":"c25496709718e206d2afb9b7558b27052593359b","user":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","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":52104368,"name":"addons-frontend","full_name":"mozilla/addons-frontend","owner":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","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/addons-frontend","description":"Front-end infrastructure and code to complement mozilla/addons-server","fork":false,"url":"https://api.github.com/repos/mozilla/addons-frontend","forks_url":"https://api.github.com/repos/mozilla/addons-frontend/forks","keys_url":"https://api.github.com/repos/mozilla/addons-frontend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla/addons-frontend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla/addons-frontend/teams","hooks_url":"https://api.github.com/repos/mozilla/addons-frontend/hooks","issue_events_url":"https://api.github.com/repos/mozilla/addons-frontend/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla/addons-frontend/events","assignees_url":"https://api.github.com/repos/mozilla/addons-frontend/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla/addons-frontend/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla/addons-frontend/tags","blobs_url":"https://api.github.com/repos/mozilla/addons-frontend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla/addons-frontend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla/addons-frontend/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla/addons-frontend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla/addons-frontend/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla/addons-frontend/languages","stargazers_url":"https://api.github.com/repos/mozilla/addons-frontend/stargazers","contributors_url":"https://api.github.com/repos/mozilla/addons-frontend/contributors","subscribers_url":"https://api.github.com/repos/mozilla/addons-frontend/subscribers","subscription_url":"https://api.github.com/repos/mozilla/addons-frontend/subscription","commits_url":"https://api.github.com/repos/mozilla/addons-frontend/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla/addons-frontend/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla/addons-frontend/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla/addons-frontend/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla/addons-frontend/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla/addons-frontend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla/addons-frontend/merges","archive_url":"https://api.github.com/repos/mozilla/addons-frontend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla/addons-frontend/downloads","issues_url":"https://api.github.com/repos/mozilla/addons-frontend/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla/addons-frontend/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla/addons-frontend/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla/addons-frontend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla/addons-frontend/labels{/name}","releases_url":"https://api.github.com/repos/mozilla/addons-frontend/releases{/id}","deployments_url":"https://api.github.com/repos/mozilla/addons-frontend/deployments","created_at":"2016-02-19T17:25:57Z","updated_at":"2016-05-13T14:26:10Z","pushed_at":"2016-06-03T14:45:28Z","git_url":"git://github.com/mozilla/addons-frontend.git","ssh_url":"git@github.com:mozilla/addons-frontend.git","clone_url":"https://github.com/mozilla/addons-frontend.git","svn_url":"https://github.com/mozilla/addons-frontend","homepage":null,"size":65999,"stargazers_count":5,"watchers_count":5,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":50,"forks":6,"open_issues":50,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla/addons-frontend/pulls/513"},"html":{"href":"https://github.com/mozilla/addons-frontend/pull/513"},"issue":{"href":"https://api.github.com/repos/mozilla/addons-frontend/issues/513"},"comments":{"href":"https://api.github.com/repos/mozilla/addons-frontend/issues/513/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla/addons-frontend/pulls/513/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla/addons-frontend/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mozilla/addons-frontend/pulls/513/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla/addons-frontend/statuses/5b439f48f696d2d879336b49ee4a0246c3ab2db5"}}}}
{"actor":{"display_login":"mstriemer"}}