{"action":"created","comment":{"url":"https://api.github.com/repos/mongodb/docs-tools/pulls/comments/208612833","pull_request_review_id":144454062,"id":208612833,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwODYxMjgzMw==","diff_hunk":"@@ -20,8 +38,39 @@ export function initialize() {\n \n     // Delighted\n     !function(e,t,r,n,a){if(!e[a]){for(var i=e[a]=[],s=0;s<r.length;s++){var c=r[s];i[c]=i[c]||function(e){return function(){var t=Array.prototype.slice.call(arguments);i.push([e,t])}}(c)}i.SNIPPET_VERSION=\"1.0.1\";var o=t.createElement(\"script\");o.type=\"text/javascript\",o.async=!0,o.src=\"https://d2yyd1h5u9mauk.cloudfront.net/integrations/web/v1/library/\"+n+\"/\"+a+\".js\";var l=t.getElementsByTagName(\"script\")[0];l.parentNode.insertBefore(o,l)}}(window,document,[\"survey\",\"reset\",\"config\",\"init\",\"set\",\"get\",\"event\",\"identify\",\"track\",\"page\",\"screen\",\"group\",\"alias\"],\"Dk30CC86ba0nATlK\",\"delighted\");\n+\n+    // Google Analytics\n+    window.ga('create', 'UA-7301842-14', 'auto');\n }\n \n-export function setup() {\n-    window.delighted.survey();\n+export function setup(fastNav) {\n+    const project = document.body.getAttribute('data-project');\n+    try {\n+        const sampleFactor = SAMPLE_FACTORS[project] || 0.1;\n+        window.delighted.survey({\n+            minTimeOnPage: 180,\n+            sampleFactor: sampleFactor\n+        });\n+    } catch (err) {\n+        console.error(err);\n+    }\n+\n+    // Update Google Analytics\n+    try {\n+        window.ga('set', 'page', location.pathname + location.query);","path":"themes/mongodb/src/js/componentThirdParty.js","position":47,"original_position":47,"commit_id":"529a30f25b74acbca9d9aaa916244a0701a6b04d","original_commit_id":"529a30f25b74acbca9d9aaa916244a0701a6b04d","user":{"login":"kirbyk","id":1156201,"node_id":"MDQ6VXNlcjExNTYyMDE=","avatar_url":"https://avatars0.githubusercontent.com/u/1156201?v=4","gravatar_id":"","url":"https://api.github.com/users/kirbyk","html_url":"https://github.com/kirbyk","followers_url":"https://api.github.com/users/kirbyk/followers","following_url":"https://api.github.com/users/kirbyk/following{/other_user}","gists_url":"https://api.github.com/users/kirbyk/gists{/gist_id}","starred_url":"https://api.github.com/users/kirbyk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kirbyk/subscriptions","organizations_url":"https://api.github.com/users/kirbyk/orgs","repos_url":"https://api.github.com/users/kirbyk/repos","events_url":"https://api.github.com/users/kirbyk/events{/privacy}","received_events_url":"https://api.github.com/users/kirbyk/received_events","type":"User","site_admin":false},"body":"What is `location.query`? I think we just want the pathname based on [these docs](https://developers.google.com/analytics/devguides/collection/analyticsjs/single-page-applications#handling_multiple_urls_for_the_same_resource).\r\n\r\n","created_at":"2018-08-08T14:52:36Z","updated_at":"2018-08-08T14:55:17Z","html_url":"https://github.com/mongodb/docs-tools/pull/222#discussion_r208612833","pull_request_url":"https://api.github.com/repos/mongodb/docs-tools/pulls/222","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/mongodb/docs-tools/pulls/comments/208612833"},"html":{"href":"https://github.com/mongodb/docs-tools/pull/222#discussion_r208612833"},"pull_request":{"href":"https://api.github.com/repos/mongodb/docs-tools/pulls/222"}}},"pull_request":{"url":"https://api.github.com/repos/mongodb/docs-tools/pulls/222","id":206830124,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA2ODMwMTI0","html_url":"https://github.com/mongodb/docs-tools/pull/222","diff_url":"https://github.com/mongodb/docs-tools/pull/222.diff","patch_url":"https://github.com/mongodb/docs-tools/pull/222.patch","issue_url":"https://api.github.com/repos/mongodb/docs-tools/issues/222","number":222,"state":"open","locked":false,"title":"DOCSP-2984: Improve analytics","user":{"login":"i80and","id":334192,"node_id":"MDQ6VXNlcjMzNDE5Mg==","avatar_url":"https://avatars3.githubusercontent.com/u/334192?v=4","gravatar_id":"","url":"https://api.github.com/users/i80and","html_url":"https://github.com/i80and","followers_url":"https://api.github.com/users/i80and/followers","following_url":"https://api.github.com/users/i80and/following{/other_user}","gists_url":"https://api.github.com/users/i80and/gists{/gist_id}","starred_url":"https://api.github.com/users/i80and/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/i80and/subscriptions","organizations_url":"https://api.github.com/users/i80and/orgs","repos_url":"https://api.github.com/users/i80and/repos","events_url":"https://api.github.com/users/i80and/events{/privacy}","received_events_url":"https://api.github.com/users/i80and/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-08-07T21:20:02Z","updated_at":"2018-08-08T14:55:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cb17298224167c0089265c2f78523c1e8a0c226a","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/mongodb/docs-tools/pulls/222/commits","review_comments_url":"https://api.github.com/repos/mongodb/docs-tools/pulls/222/comments","review_comment_url":"https://api.github.com/repos/mongodb/docs-tools/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mongodb/docs-tools/issues/222/comments","statuses_url":"https://api.github.com/repos/mongodb/docs-tools/statuses/529a30f25b74acbca9d9aaa916244a0701a6b04d","head":{"label":"i80and:DOCSP-2984","ref":"DOCSP-2984","sha":"529a30f25b74acbca9d9aaa916244a0701a6b04d","user":{"login":"i80and","id":334192,"node_id":"MDQ6VXNlcjMzNDE5Mg==","avatar_url":"https://avatars3.githubusercontent.com/u/334192?v=4","gravatar_id":"","url":"https://api.github.com/users/i80and","html_url":"https://github.com/i80and","followers_url":"https://api.github.com/users/i80and/followers","following_url":"https://api.github.com/users/i80and/following{/other_user}","gists_url":"https://api.github.com/users/i80and/gists{/gist_id}","starred_url":"https://api.github.com/users/i80and/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/i80and/subscriptions","organizations_url":"https://api.github.com/users/i80and/orgs","repos_url":"https://api.github.com/users/i80and/repos","events_url":"https://api.github.com/users/i80and/events{/privacy}","received_events_url":"https://api.github.com/users/i80and/received_events","type":"User","site_admin":false},"repo":{"id":23675179,"node_id":"MDEwOlJlcG9zaXRvcnkyMzY3NTE3OQ==","name":"docs-tools","full_name":"i80and/docs-tools","owner":{"login":"i80and","id":334192,"node_id":"MDQ6VXNlcjMzNDE5Mg==","avatar_url":"https://avatars3.githubusercontent.com/u/334192?v=4","gravatar_id":"","url":"https://api.github.com/users/i80and","html_url":"https://github.com/i80and","followers_url":"https://api.github.com/users/i80and/followers","following_url":"https://api.github.com/users/i80and/following{/other_user}","gists_url":"https://api.github.com/users/i80and/gists{/gist_id}","starred_url":"https://api.github.com/users/i80and/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/i80and/subscriptions","organizations_url":"https://api.github.com/users/i80and/orgs","repos_url":"https://api.github.com/users/i80and/repos","events_url":"https://api.github.com/users/i80and/events{/privacy}","received_events_url":"https://api.github.com/users/i80and/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/i80and/docs-tools","description":"Common tools and content for MongoDB documentation projects.","fork":true,"url":"https://api.github.com/repos/i80and/docs-tools","forks_url":"https://api.github.com/repos/i80and/docs-tools/forks","keys_url":"https://api.github.com/repos/i80and/docs-tools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/i80and/docs-tools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/i80and/docs-tools/teams","hooks_url":"https://api.github.com/repos/i80and/docs-tools/hooks","issue_events_url":"https://api.github.com/repos/i80and/docs-tools/issues/events{/number}","events_url":"https://api.github.com/repos/i80and/docs-tools/events","assignees_url":"https://api.github.com/repos/i80and/docs-tools/assignees{/user}","branches_url":"https://api.github.com/repos/i80and/docs-tools/branches{/branch}","tags_url":"https://api.github.com/repos/i80and/docs-tools/tags","blobs_url":"https://api.github.com/repos/i80and/docs-tools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/i80and/docs-tools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/i80and/docs-tools/git/refs{/sha}","trees_url":"https://api.github.com/repos/i80and/docs-tools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/i80and/docs-tools/statuses/{sha}","languages_url":"https://api.github.com/repos/i80and/docs-tools/languages","stargazers_url":"https://api.github.com/repos/i80and/docs-tools/stargazers","contributors_url":"https://api.github.com/repos/i80and/docs-tools/contributors","subscribers_url":"https://api.github.com/repos/i80and/docs-tools/subscribers","subscription_url":"https://api.github.com/repos/i80and/docs-tools/subscription","commits_url":"https://api.github.com/repos/i80and/docs-tools/commits{/sha}","git_commits_url":"https://api.github.com/repos/i80and/docs-tools/git/commits{/sha}","comments_url":"https://api.github.com/repos/i80and/docs-tools/comments{/number}","issue_comment_url":"https://api.github.com/repos/i80and/docs-tools/issues/comments{/number}","contents_url":"https://api.github.com/repos/i80and/docs-tools/contents/{+path}","compare_url":"https://api.github.com/repos/i80and/docs-tools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/i80and/docs-tools/merges","archive_url":"https://api.github.com/repos/i80and/docs-tools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/i80and/docs-tools/downloads","issues_url":"https://api.github.com/repos/i80and/docs-tools/issues{/number}","pulls_url":"https://api.github.com/repos/i80and/docs-tools/pulls{/number}","milestones_url":"https://api.github.com/repos/i80and/docs-tools/milestones{/number}","notifications_url":"https://api.github.com/repos/i80and/docs-tools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/i80and/docs-tools/labels{/name}","releases_url":"https://api.github.com/repos/i80and/docs-tools/releases{/id}","deployments_url":"https://api.github.com/repos/i80and/docs-tools/deployments","created_at":"2014-09-04T18:55:48Z","updated_at":"2016-01-13T01:04:12Z","pushed_at":"2018-08-07T21:19:34Z","git_url":"git://github.com/i80and/docs-tools.git","ssh_url":"git@github.com:i80and/docs-tools.git","clone_url":"https://github.com/i80and/docs-tools.git","svn_url":"https://github.com/i80and/docs-tools","homepage":null,"size":8769,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mongodb:master","ref":"master","sha":"3d9537d4527cfc53768691349c280b84c36aca6d","user":{"login":"mongodb","id":45120,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ1MTIw","avatar_url":"https://avatars1.githubusercontent.com/u/45120?v=4","gravatar_id":"","url":"https://api.github.com/users/mongodb","html_url":"https://github.com/mongodb","followers_url":"https://api.github.com/users/mongodb/followers","following_url":"https://api.github.com/users/mongodb/following{/other_user}","gists_url":"https://api.github.com/users/mongodb/gists{/gist_id}","starred_url":"https://api.github.com/users/mongodb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mongodb/subscriptions","organizations_url":"https://api.github.com/users/mongodb/orgs","repos_url":"https://api.github.com/users/mongodb/repos","events_url":"https://api.github.com/users/mongodb/events{/privacy}","received_events_url":"https://api.github.com/users/mongodb/received_events","type":"Organization","site_admin":false},"repo":{"id":10223615,"node_id":"MDEwOlJlcG9zaXRvcnkxMDIyMzYxNQ==","name":"docs-tools","full_name":"mongodb/docs-tools","owner":{"login":"mongodb","id":45120,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ1MTIw","avatar_url":"https://avatars1.githubusercontent.com/u/45120?v=4","gravatar_id":"","url":"https://api.github.com/users/mongodb","html_url":"https://github.com/mongodb","followers_url":"https://api.github.com/users/mongodb/followers","following_url":"https://api.github.com/users/mongodb/following{/other_user}","gists_url":"https://api.github.com/users/mongodb/gists{/gist_id}","starred_url":"https://api.github.com/users/mongodb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mongodb/subscriptions","organizations_url":"https://api.github.com/users/mongodb/orgs","repos_url":"https://api.github.com/users/mongodb/repos","events_url":"https://api.github.com/users/mongodb/events{/privacy}","received_events_url":"https://api.github.com/users/mongodb/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mongodb/docs-tools","description":"Common tools and content for MongoDB documentation projects.","fork":false,"url":"https://api.github.com/repos/mongodb/docs-tools","forks_url":"https://api.github.com/repos/mongodb/docs-tools/forks","keys_url":"https://api.github.com/repos/mongodb/docs-tools/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mongodb/docs-tools/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mongodb/docs-tools/teams","hooks_url":"https://api.github.com/repos/mongodb/docs-tools/hooks","issue_events_url":"https://api.github.com/repos/mongodb/docs-tools/issues/events{/number}","events_url":"https://api.github.com/repos/mongodb/docs-tools/events","assignees_url":"https://api.github.com/repos/mongodb/docs-tools/assignees{/user}","branches_url":"https://api.github.com/repos/mongodb/docs-tools/branches{/branch}","tags_url":"https://api.github.com/repos/mongodb/docs-tools/tags","blobs_url":"https://api.github.com/repos/mongodb/docs-tools/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mongodb/docs-tools/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mongodb/docs-tools/git/refs{/sha}","trees_url":"https://api.github.com/repos/mongodb/docs-tools/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mongodb/docs-tools/statuses/{sha}","languages_url":"https://api.github.com/repos/mongodb/docs-tools/languages","stargazers_url":"https://api.github.com/repos/mongodb/docs-tools/stargazers","contributors_url":"https://api.github.com/repos/mongodb/docs-tools/contributors","subscribers_url":"https://api.github.com/repos/mongodb/docs-tools/subscribers","subscription_url":"https://api.github.com/repos/mongodb/docs-tools/subscription","commits_url":"https://api.github.com/repos/mongodb/docs-tools/commits{/sha}","git_commits_url":"https://api.github.com/repos/mongodb/docs-tools/git/commits{/sha}","comments_url":"https://api.github.com/repos/mongodb/docs-tools/comments{/number}","issue_comment_url":"https://api.github.com/repos/mongodb/docs-tools/issues/comments{/number}","contents_url":"https://api.github.com/repos/mongodb/docs-tools/contents/{+path}","compare_url":"https://api.github.com/repos/mongodb/docs-tools/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mongodb/docs-tools/merges","archive_url":"https://api.github.com/repos/mongodb/docs-tools/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mongodb/docs-tools/downloads","issues_url":"https://api.github.com/repos/mongodb/docs-tools/issues{/number}","pulls_url":"https://api.github.com/repos/mongodb/docs-tools/pulls{/number}","milestones_url":"https://api.github.com/repos/mongodb/docs-tools/milestones{/number}","notifications_url":"https://api.github.com/repos/mongodb/docs-tools/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mongodb/docs-tools/labels{/name}","releases_url":"https://api.github.com/repos/mongodb/docs-tools/releases{/id}","deployments_url":"https://api.github.com/repos/mongodb/docs-tools/deployments","created_at":"2013-05-22T15:47:12Z","updated_at":"2018-08-07T16:08:18Z","pushed_at":"2018-08-07T21:20:03Z","git_url":"git://github.com/mongodb/docs-tools.git","ssh_url":"git@github.com:mongodb/docs-tools.git","clone_url":"https://github.com/mongodb/docs-tools.git","svn_url":"https://github.com/mongodb/docs-tools","homepage":null,"size":8936,"stargazers_count":31,"watchers_count":31,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":51,"mirror_url":null,"archived":false,"open_issues_count":6,"license":null,"forks":51,"open_issues":6,"watchers":31,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mongodb/docs-tools/pulls/222"},"html":{"href":"https://github.com/mongodb/docs-tools/pull/222"},"issue":{"href":"https://api.github.com/repos/mongodb/docs-tools/issues/222"},"comments":{"href":"https://api.github.com/repos/mongodb/docs-tools/issues/222/comments"},"review_comments":{"href":"https://api.github.com/repos/mongodb/docs-tools/pulls/222/comments"},"review_comment":{"href":"https://api.github.com/repos/mongodb/docs-tools/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mongodb/docs-tools/pulls/222/commits"},"statuses":{"href":"https://api.github.com/repos/mongodb/docs-tools/statuses/529a30f25b74acbca9d9aaa916244a0701a6b04d"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"kirbyk"}}