{"action":"created","comment":{"url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/pulls/comments/32701117","id":32701117,"diff_hunk":"@@ -97,17 +110,27 @@ AdRoll.prototype.track = function(track) {\n   del(customProps, 'orderId');\n   del(customProps, 'id');\n   del(customProps, 'sku');\n-  if (!is.empty(customProps)) data.adroll_custom_data = customProps;\n+  if (!is.empty(customProps)) {","path":"lib/index.js","position":51,"original_position":51,"commit_id":"91c4074ed321f8f4cc25be2ebcf98566ee58fa1c","original_commit_id":"91c4074ed321f8f4cc25be2ebcf98566ee58fa1c","user":{"login":"sperand-io","id":3130232,"avatar_url":"https://avatars.githubusercontent.com/u/3130232?v=3","gravatar_id":"","url":"https://api.github.com/users/sperand-io","html_url":"https://github.com/sperand-io","followers_url":"https://api.github.com/users/sperand-io/followers","following_url":"https://api.github.com/users/sperand-io/following{/other_user}","gists_url":"https://api.github.com/users/sperand-io/gists{/gist_id}","starred_url":"https://api.github.com/users/sperand-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sperand-io/subscriptions","organizations_url":"https://api.github.com/users/sperand-io/orgs","repos_url":"https://api.github.com/users/sperand-io/repos","events_url":"https://api.github.com/users/sperand-io/events{/privacy}","received_events_url":"https://api.github.com/users/sperand-io/received_events","type":"User","site_admin":false},"body":"haha no idea, i wasn't thinking about refactor existing code at all to keep things *relatively* sane in this change :)","created_at":"2015-06-18T06:02:53Z","updated_at":"2015-06-18T06:02:53Z","html_url":"https://github.com/segment-integrations/analytics.js-integration-adroll/pull/3#discussion_r32701117","pull_request_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/pulls/3","_links":{"self":{"href":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/pulls/comments/32701117"},"html":{"href":"https://github.com/segment-integrations/analytics.js-integration-adroll/pull/3#discussion_r32701117"},"pull_request":{"href":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/pulls/3","id":37520236,"html_url":"https://github.com/segment-integrations/analytics.js-integration-adroll/pull/3","diff_url":"https://github.com/segment-integrations/analytics.js-integration-adroll/pull/3.diff","patch_url":"https://github.com/segment-integrations/analytics.js-integration-adroll/pull/3.patch","issue_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/issues/3","number":3,"state":"open","locked":false,"title":"update adroll to v2","user":{"login":"sperand-io","id":3130232,"avatar_url":"https://avatars.githubusercontent.com/u/3130232?v=3","gravatar_id":"","url":"https://api.github.com/users/sperand-io","html_url":"https://github.com/sperand-io","followers_url":"https://api.github.com/users/sperand-io/followers","following_url":"https://api.github.com/users/sperand-io/following{/other_user}","gists_url":"https://api.github.com/users/sperand-io/gists{/gist_id}","starred_url":"https://api.github.com/users/sperand-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sperand-io/subscriptions","organizations_url":"https://api.github.com/users/sperand-io/orgs","repos_url":"https://api.github.com/users/sperand-io/repos","events_url":"https://api.github.com/users/sperand-io/events{/privacy}","received_events_url":"https://api.github.com/users/sperand-io/received_events","type":"User","site_admin":false},"body":"**Waiting on: https://github.com/segmentio/mongo-scripts/pull/10**\r\n\r\nPort of https://github.com/segmentio/analytics.js-integrations/pull/616\r\n\r\n\r\n>Three fixes rolled into one PR:\r\n\r\n>**1) Support for sending email (closes #610)**\r\n>Original patch submitted by @leohklee. Thanks! :smile: \r\n\r\n>**2) Fixes adroll custom data behavior (closes #588)**\r\n>This was a great catch by @chiplay. As he explained in #588, the `__adroll.record_user` method parses out top level fields and \"custom data\" itself. The docs that show setting the `adroll_custom_data` object are referring to a global object on the window, not a sub-object that gets passed into that method. Not sure how we missed this :/\r\n\r\n>![](https://cloudup.com/c-LJgdiHQ30+)\r\n\r\n>**3) Deprecates sending segments by name** ([Related Ticket](https://segment.zendesk.com/agent/tickets/28111))\r\n>As of April it's required to use a [segmentId](https://help.adroll.com/hc/en-us/articles/203637220-Advanced-Non-URL-Segmentation-Strategies#content-anchor) instead of a segment name, so the strategy to deal with this in a non-breaking manner is to put new users on a \"v2\" and leave old users on \"v1\" (`options.legacy == true`).\r\n\r\n>Only distinction between v1 and v2 is that v1 would send unmapped events with `adroll_segments` set to the snake_cased event name, which will no longer be accepted for any new segments. The reason I'd argue we can't just remove support for unmapped events is because adroll still supports the `segment_name` approach for any segments created prior to March, and we have lots of existing customers relying on that who never needed to specifically map the events before unless they wanted to map multiple events to a given segment like the example here:\r\n\r\n>![](https://cloudup.com/cQyZgOi_pRV+) \r\n\r\n>For *mapped events*, the behavior is the exact same, we'll just need to update documentation that new users need to map to the segment_id instead of the snaked name prepended with a `+`.\r\n\r\n","created_at":"2015-06-11T23:43:57Z","updated_at":"2015-06-18T06:02:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ac7f812c31b6115e3dab369bff1f9371389b2d2c","assignee":{"login":"ndhoule","id":1863990,"avatar_url":"https://avatars.githubusercontent.com/u/1863990?v=3","gravatar_id":"","url":"https://api.github.com/users/ndhoule","html_url":"https://github.com/ndhoule","followers_url":"https://api.github.com/users/ndhoule/followers","following_url":"https://api.github.com/users/ndhoule/following{/other_user}","gists_url":"https://api.github.com/users/ndhoule/gists{/gist_id}","starred_url":"https://api.github.com/users/ndhoule/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ndhoule/subscriptions","organizations_url":"https://api.github.com/users/ndhoule/orgs","repos_url":"https://api.github.com/users/ndhoule/repos","events_url":"https://api.github.com/users/ndhoule/events{/privacy}","received_events_url":"https://api.github.com/users/ndhoule/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/pulls/3/commits","review_comments_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/pulls/3/comments","review_comment_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/pulls/comments{/number}","comments_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/issues/3/comments","statuses_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/statuses/91c4074ed321f8f4cc25be2ebcf98566ee58fa1c","head":{"label":"segment-integrations:update/v2","ref":"update/v2","sha":"91c4074ed321f8f4cc25be2ebcf98566ee58fa1c","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":37163050,"name":"analytics.js-integration-adroll","full_name":"segment-integrations/analytics.js-integration-adroll","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-adroll","description":"The Adroll analytics.js integration.","fork":false,"url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll","forks_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/forks","keys_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/keys{/key_id}","collaborators_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/teams","hooks_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/hooks","issue_events_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/issues/events{/number}","events_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/events","assignees_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/assignees{/user}","branches_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/branches{/branch}","tags_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/tags","blobs_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/git/refs{/sha}","trees_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/git/trees{/sha}","statuses_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/statuses/{sha}","languages_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/languages","stargazers_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/stargazers","contributors_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/contributors","subscribers_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/subscribers","subscription_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/subscription","commits_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/commits{/sha}","git_commits_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/git/commits{/sha}","comments_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/comments{/number}","issue_comment_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/issues/comments{/number}","contents_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/contents/{+path}","compare_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/compare/{base}...{head}","merges_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/merges","archive_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/downloads","issues_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/issues{/number}","pulls_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/pulls{/number}","milestones_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/milestones{/number}","notifications_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/labels{/name}","releases_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/releases{/id}","created_at":"2015-06-09T22:57:29Z","updated_at":"2015-06-09T22:57:31Z","pushed_at":"2015-06-11T23:43:57Z","git_url":"git://github.com/segment-integrations/analytics.js-integration-adroll.git","ssh_url":"git@github.com:segment-integrations/analytics.js-integration-adroll.git","clone_url":"https://github.com/segment-integrations/analytics.js-integration-adroll.git","svn_url":"https://github.com/segment-integrations/analytics.js-integration-adroll","homepage":"https://segment.com/docs/integrations/adroll/","size":148,"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":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"base":{"label":"segment-integrations:master","ref":"master","sha":"61fadaa373adc157c46654d5bc783344f9b1a9b8","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":37163050,"name":"analytics.js-integration-adroll","full_name":"segment-integrations/analytics.js-integration-adroll","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-adroll","description":"The Adroll analytics.js integration.","fork":false,"url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll","forks_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/forks","keys_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/keys{/key_id}","collaborators_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/teams","hooks_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/hooks","issue_events_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/issues/events{/number}","events_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/events","assignees_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/assignees{/user}","branches_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/branches{/branch}","tags_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/tags","blobs_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/git/refs{/sha}","trees_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/git/trees{/sha}","statuses_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/statuses/{sha}","languages_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/languages","stargazers_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/stargazers","contributors_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/contributors","subscribers_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/subscribers","subscription_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/subscription","commits_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/commits{/sha}","git_commits_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/git/commits{/sha}","comments_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/comments{/number}","issue_comment_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/issues/comments{/number}","contents_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/contents/{+path}","compare_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/compare/{base}...{head}","merges_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/merges","archive_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/downloads","issues_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/issues{/number}","pulls_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/pulls{/number}","milestones_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/milestones{/number}","notifications_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/labels{/name}","releases_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/releases{/id}","created_at":"2015-06-09T22:57:29Z","updated_at":"2015-06-09T22:57:31Z","pushed_at":"2015-06-11T23:43:57Z","git_url":"git://github.com/segment-integrations/analytics.js-integration-adroll.git","ssh_url":"git@github.com:segment-integrations/analytics.js-integration-adroll.git","clone_url":"https://github.com/segment-integrations/analytics.js-integration-adroll.git","svn_url":"https://github.com/segment-integrations/analytics.js-integration-adroll","homepage":"https://segment.com/docs/integrations/adroll/","size":148,"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":3,"forks":0,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/pulls/3"},"html":{"href":"https://github.com/segment-integrations/analytics.js-integration-adroll/pull/3"},"issue":{"href":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/issues/3"},"comments":{"href":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/segment-integrations/analytics.js-integration-adroll/statuses/91c4074ed321f8f4cc25be2ebcf98566ee58fa1c"}}}}