{"action":"created","comment":{"url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/pulls/comments/51525720","id":51525720,"diff_hunk":"@@ -87,17 +87,19 @@ Mixpanel.prototype.loaded = function() {\n \n Mixpanel.prototype.page = function(page) {\n   var category = page.category();\n-  var name = page.fullName();\n+  var name = page.name();\n   var opts = this.options;\n \n   // all pages\n   if (opts.trackAllPages) {\n-    this.track(page.track());\n+    return this.track(page.track());\n   }\n \n   // categorized pages\n-  if (category && opts.trackCategorizedPages) {\n-    this.track(page.track(category));\n+  if (opts.trackCategorizedPages && category) {\n+    // If this option is checked and name was also passed, used the full name which includes both category & name\n+    if (name) return this.track(page.track(page.fullName()));\n+    return this.track(page.track(category));","path":"lib/index.js","position":20,"original_position":20,"commit_id":"628a9ed18cca7af7ed35a7473cfdb901bfca94e4","original_commit_id":"628a9ed18cca7af7ed35a7473cfdb901bfca94e4","user":{"login":"f2prateek","id":843979,"avatar_url":"https://avatars.githubusercontent.com/u/843979?v=3","gravatar_id":"","url":"https://api.github.com/users/f2prateek","html_url":"https://github.com/f2prateek","followers_url":"https://api.github.com/users/f2prateek/followers","following_url":"https://api.github.com/users/f2prateek/following{/other_user}","gists_url":"https://api.github.com/users/f2prateek/gists{/gist_id}","starred_url":"https://api.github.com/users/f2prateek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/f2prateek/subscriptions","organizations_url":"https://api.github.com/users/f2prateek/orgs","repos_url":"https://api.github.com/users/f2prateek/repos","events_url":"https://api.github.com/users/f2prateek/events{/privacy}","received_events_url":"https://api.github.com/users/f2prateek/received_events","type":"User","site_admin":false},"body":"Just a style thing since this method shouldn't be returning a value, return on the next line makes that clear.","created_at":"2016-02-02T05:26:00Z","updated_at":"2016-02-02T05:26:00Z","html_url":"https://github.com/segment-integrations/analytics.js-integration-mixpanel/pull/20#discussion_r51525720","pull_request_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/pulls/20","_links":{"self":{"href":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/pulls/comments/51525720"},"html":{"href":"https://github.com/segment-integrations/analytics.js-integration-mixpanel/pull/20#discussion_r51525720"},"pull_request":{"href":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/pulls/20"}}},"pull_request":{"url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/pulls/20","id":57928233,"html_url":"https://github.com/segment-integrations/analytics.js-integration-mixpanel/pull/20","diff_url":"https://github.com/segment-integrations/analytics.js-integration-mixpanel/pull/20.diff","patch_url":"https://github.com/segment-integrations/analytics.js-integration-mixpanel/pull/20.patch","issue_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/issues/20","number":20,"state":"open","locked":false,"title":"fix multiple page call issue","user":{"login":"hankim813","id":5907121,"avatar_url":"https://avatars.githubusercontent.com/u/5907121?v=3","gravatar_id":"","url":"https://api.github.com/users/hankim813","html_url":"https://github.com/hankim813","followers_url":"https://api.github.com/users/hankim813/followers","following_url":"https://api.github.com/users/hankim813/following{/other_user}","gists_url":"https://api.github.com/users/hankim813/gists{/gist_id}","starred_url":"https://api.github.com/users/hankim813/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hankim813/subscriptions","organizations_url":"https://api.github.com/users/hankim813/orgs","repos_url":"https://api.github.com/users/hankim813/repos","events_url":"https://api.github.com/users/hankim813/events{/privacy}","received_events_url":"https://api.github.com/users/hankim813/received_events","type":"User","site_admin":false},"body":"@f2prateek can you check this? I followed your guideline from https://segment.phacility.com/T884\r\n\r\nthe previous tests for this was incorrectly testing the behavior behind when you call `analytics.page('category', 'name')` by checking that it called `Viewed Category Page`. It was passing because we were making extra calls and the `trackAllPages` block would use the `fullName()` which includes both name and category. \r\n\r\nNow, even if you have both track category and named pages enabled (which it is by default), if you pass both category and name, it will respect both and combine the two as we have said in our docs. \r\n\r\nIf you have track category enabled and only pass category, we would just send `Viewed Category Page`. ","created_at":"2016-02-02T01:32:24Z","updated_at":"2016-02-02T05:26:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c0b33014101ec7426fa39857251e92f386061566","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/pulls/20/commits","review_comments_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/pulls/20/comments","review_comment_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/pulls/comments{/number}","comments_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/issues/20/comments","statuses_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/statuses/628a9ed18cca7af7ed35a7473cfdb901bfca94e4","head":{"label":"segment-integrations:fix-page-calls","ref":"fix-page-calls","sha":"628a9ed18cca7af7ed35a7473cfdb901bfca94e4","user":{"login":"segment-integrations","id":11207740,"avatar_url":"https://avatars.githubusercontent.com/u/11207740?v=3","gravatar_id":"","url":"https://api.github.com/users/segment-integrations","html_url":"https://github.com/segment-integrations","followers_url":"https://api.github.com/users/segment-integrations/followers","following_url":"https://api.github.com/users/segment-integrations/following{/other_user}","gists_url":"https://api.github.com/users/segment-integrations/gists{/gist_id}","starred_url":"https://api.github.com/users/segment-integrations/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/segment-integrations/subscriptions","organizations_url":"https://api.github.com/users/segment-integrations/orgs","repos_url":"https://api.github.com/users/segment-integrations/repos","events_url":"https://api.github.com/users/segment-integrations/events{/privacy}","received_events_url":"https://api.github.com/users/segment-integrations/received_events","type":"Organization","site_admin":false},"repo":{"id":37163319,"name":"analytics.js-integration-mixpanel","full_name":"segment-integrations/analytics.js-integration-mixpanel","owner":{"login":"segment-integrations","id":11207740,"avatar_url":"https://avatars.githubusercontent.com/u/11207740?v=3","gravatar_id":"","url":"https://api.github.com/users/segment-integrations","html_url":"https://github.com/segment-integrations","followers_url":"https://api.github.com/users/segment-integrations/followers","following_url":"https://api.github.com/users/segment-integrations/following{/other_user}","gists_url":"https://api.github.com/users/segment-integrations/gists{/gist_id}","starred_url":"https://api.github.com/users/segment-integrations/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/segment-integrations/subscriptions","organizations_url":"https://api.github.com/users/segment-integrations/orgs","repos_url":"https://api.github.com/users/segment-integrations/repos","events_url":"https://api.github.com/users/segment-integrations/events{/privacy}","received_events_url":"https://api.github.com/users/segment-integrations/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/segment-integrations/analytics.js-integration-mixpanel","description":"The Mixpanel analytics.js integration.","fork":false,"url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel","forks_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/forks","keys_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/teams","hooks_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/hooks","issue_events_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/issues/events{/number}","events_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/events","assignees_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/assignees{/user}","branches_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/branches{/branch}","tags_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/tags","blobs_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/git/refs{/sha}","trees_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/statuses/{sha}","languages_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/languages","stargazers_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/stargazers","contributors_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/contributors","subscribers_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/subscribers","subscription_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/subscription","commits_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/commits{/sha}","git_commits_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/git/commits{/sha}","comments_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/comments{/number}","issue_comment_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/issues/comments{/number}","contents_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/contents/{+path}","compare_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/merges","archive_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/downloads","issues_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/issues{/number}","pulls_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/pulls{/number}","milestones_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/milestones{/number}","notifications_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/labels{/name}","releases_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/releases{/id}","deployments_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/deployments","created_at":"2015-06-09T23:02:27Z","updated_at":"2015-06-09T23:02:29Z","pushed_at":"2016-02-02T01:32:25Z","git_url":"git://github.com/segment-integrations/analytics.js-integration-mixpanel.git","ssh_url":"git@github.com:segment-integrations/analytics.js-integration-mixpanel.git","clone_url":"https://github.com/segment-integrations/analytics.js-integration-mixpanel.git","svn_url":"https://github.com/segment-integrations/analytics.js-integration-mixpanel","homepage":"https://segment.com/docs/integrations/mixpanel/","size":32,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":5,"forks":0,"open_issues":5,"watchers":0,"default_branch":"master"}},"base":{"label":"segment-integrations:master","ref":"master","sha":"49e00f6343ca5ecce84c2d41faa5e11ffab3da49","user":{"login":"segment-integrations","id":11207740,"avatar_url":"https://avatars.githubusercontent.com/u/11207740?v=3","gravatar_id":"","url":"https://api.github.com/users/segment-integrations","html_url":"https://github.com/segment-integrations","followers_url":"https://api.github.com/users/segment-integrations/followers","following_url":"https://api.github.com/users/segment-integrations/following{/other_user}","gists_url":"https://api.github.com/users/segment-integrations/gists{/gist_id}","starred_url":"https://api.github.com/users/segment-integrations/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/segment-integrations/subscriptions","organizations_url":"https://api.github.com/users/segment-integrations/orgs","repos_url":"https://api.github.com/users/segment-integrations/repos","events_url":"https://api.github.com/users/segment-integrations/events{/privacy}","received_events_url":"https://api.github.com/users/segment-integrations/received_events","type":"Organization","site_admin":false},"repo":{"id":37163319,"name":"analytics.js-integration-mixpanel","full_name":"segment-integrations/analytics.js-integration-mixpanel","owner":{"login":"segment-integrations","id":11207740,"avatar_url":"https://avatars.githubusercontent.com/u/11207740?v=3","gravatar_id":"","url":"https://api.github.com/users/segment-integrations","html_url":"https://github.com/segment-integrations","followers_url":"https://api.github.com/users/segment-integrations/followers","following_url":"https://api.github.com/users/segment-integrations/following{/other_user}","gists_url":"https://api.github.com/users/segment-integrations/gists{/gist_id}","starred_url":"https://api.github.com/users/segment-integrations/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/segment-integrations/subscriptions","organizations_url":"https://api.github.com/users/segment-integrations/orgs","repos_url":"https://api.github.com/users/segment-integrations/repos","events_url":"https://api.github.com/users/segment-integrations/events{/privacy}","received_events_url":"https://api.github.com/users/segment-integrations/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/segment-integrations/analytics.js-integration-mixpanel","description":"The Mixpanel analytics.js integration.","fork":false,"url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel","forks_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/forks","keys_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/teams","hooks_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/hooks","issue_events_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/issues/events{/number}","events_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/events","assignees_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/assignees{/user}","branches_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/branches{/branch}","tags_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/tags","blobs_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/git/refs{/sha}","trees_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/statuses/{sha}","languages_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/languages","stargazers_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/stargazers","contributors_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/contributors","subscribers_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/subscribers","subscription_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/subscription","commits_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/commits{/sha}","git_commits_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/git/commits{/sha}","comments_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/comments{/number}","issue_comment_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/issues/comments{/number}","contents_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/contents/{+path}","compare_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/merges","archive_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/downloads","issues_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/issues{/number}","pulls_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/pulls{/number}","milestones_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/milestones{/number}","notifications_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/labels{/name}","releases_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/releases{/id}","deployments_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/deployments","created_at":"2015-06-09T23:02:27Z","updated_at":"2015-06-09T23:02:29Z","pushed_at":"2016-02-02T01:32:25Z","git_url":"git://github.com/segment-integrations/analytics.js-integration-mixpanel.git","ssh_url":"git@github.com:segment-integrations/analytics.js-integration-mixpanel.git","clone_url":"https://github.com/segment-integrations/analytics.js-integration-mixpanel.git","svn_url":"https://github.com/segment-integrations/analytics.js-integration-mixpanel","homepage":"https://segment.com/docs/integrations/mixpanel/","size":32,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":5,"forks":0,"open_issues":5,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/pulls/20"},"html":{"href":"https://github.com/segment-integrations/analytics.js-integration-mixpanel/pull/20"},"issue":{"href":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/issues/20"},"comments":{"href":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/issues/20/comments"},"review_comments":{"href":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/pulls/20/comments"},"review_comment":{"href":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/pulls/20/commits"},"statuses":{"href":"https://api.github.com/repos/segment-integrations/analytics.js-integration-mixpanel/statuses/628a9ed18cca7af7ed35a7473cfdb901bfca94e4"}}}}