{"action":"opened","number":15,"pull_request":{"url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-google-analytics/pulls/15","id":55834705,"html_url":"https://github.com/segment-integrations/analytics.js-integration-google-analytics/pull/15","diff_url":"https://github.com/segment-integrations/analytics.js-integration-google-analytics/pull/15.diff","patch_url":"https://github.com/segment-integrations/analytics.js-integration-google-analytics/pull/15.patch","issue_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-google-analytics/issues/15","number":15,"state":"open","locked":false,"title":"Set CM & CD in Enhanced Ecommerce events","user":{"login":"tejasmanohar","id":5959235,"avatar_url":"https://avatars.githubusercontent.com/u/5959235?v=3","gravatar_id":"","url":"https://api.github.com/users/tejasmanohar","html_url":"https://github.com/tejasmanohar","followers_url":"https://api.github.com/users/tejasmanohar/followers","following_url":"https://api.github.com/users/tejasmanohar/following{/other_user}","gists_url":"https://api.github.com/users/tejasmanohar/gists{/gist_id}","starred_url":"https://api.github.com/users/tejasmanohar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tejasmanohar/subscriptions","organizations_url":"https://api.github.com/users/tejasmanohar/orgs","repos_url":"https://api.github.com/users/tejasmanohar/repos","events_url":"https://api.github.com/users/tejasmanohar/events{/privacy}","received_events_url":"https://api.github.com/users/tejasmanohar/received_events","type":"User","site_admin":false},"body":"**Questions/Potential Caveats (/ things that may need fixing)**\r\n- Didn't track CM & CD in `[GA.prototype.pushEnhancedEcommerce](https://github.com/segment-integrations/analytics.js-integration-google-analytics/blob/87acacedec8f0e802932e322a2df7ff30bed65ac/lib/index.js#L544-L563)`, as this is a non-interaction event. Should these custom values still be set here?\r\n- Didn't track CM & CD in `[GA.prototype.startedOrderEnhanced](https://github.com/segment-integrations/analytics.js-integration-google-analytics/blob/87acacedec8f0e802932e322a2df7ff30bed65ac/lib/index.js#L565-L577)` or `[GA.prototype.updatedOrderEnhanced](https://github.com/segment-integrations/analytics.js-integration-google-analytics/blob/87acacedec8f0e802932e322a2df7ff30bed65ac/lib/index.js#L579-L591)`, as these seem to be aliases to other events with tracking.\r\n\r\n**Miscellaneous**\r\n- Created helper method for setting custom attributes and refactored existing tracking of them [here](https://github.com/segment-integrations/analytics.js-integration-google-analytics/blob/87acacedec8f0e802932e322a2df7ff30bed65ac/lib/index.js#L856-L872).\r\n\r\nWhat's the best way to test these changes? I made sure no existing tests failed but have not verified that the added functionality all works. Is there a way to check if custom attributes have been set via the Analytics (either Segment's or Google's) libraries?\r\n\r\n// cc @sperand-io ","created_at":"2016-01-12T23:41:30Z","updated_at":"2016-01-12T23:41:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-google-analytics/pulls/15/commits","review_comments_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-google-analytics/pulls/15/comments","review_comment_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-google-analytics/pulls/comments{/number}","comments_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-google-analytics/issues/15/comments","statuses_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-google-analytics/statuses/87acacedec8f0e802932e322a2df7ff30bed65ac","head":{"label":"segment-integrations:add/enhanced_ecommerce_custom","ref":"add/enhanced_ecommerce_custom","sha":"87acacedec8f0e802932e322a2df7ff30bed65ac","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":37163239,"name":"analytics.js-integration-google-analytics","full_name":"segment-integrations/analytics.js-integration-google-analytics","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-google-analytics","description":"The Google Analytics analytics.js integration.","fork":false,"url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-google-analytics","forks_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-google-analytics/forks","keys_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-google-analytics/keys{/key_id}","collaborators_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-google-analytics/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-google-analytics/teams","hooks_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-google-analytics/hooks","issue_events_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-google-analytics/issues/events{/number}","events_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-google-analytics/events","assignees_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-google-analytics/assignees{/user}","branches_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-google-analytics/branches{/branch}","tags_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-google-analytics/tags","blobs_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-google-analytics/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-google-analytics/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-google-analytics/git/refs{/sha}","trees_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-google-analytics/git/trees{/sha}","statuses_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-google-analytics/statuses/{sha}","languages_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-google-analytics/languages","stargazers_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-google-analytics/stargazers","contributors_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-google-analytics/contributors","subscribers_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-google-analytics/subscribers","subscription_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-google-analytics/subscription","commits_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-google-analytics/commits{/sha}","git_commits_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-google-analytics/git/commits{/sha}","comments_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-google-analytics/comments{/number}","issue_comment_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-google-analytics/issues/comments{/number}","contents_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-google-analytics/contents/{+path}","compare_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-google-analytics/compare/{base}...{head}","merges_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-google-analytics/merges","archive_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-google-analytics/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-google-analytics/downloads","issues_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-google-analytics/issues{/number}","pulls_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-google-analytics/pulls{/number}","milestones_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-google-analytics/milestones{/number}","notifications_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-google-analytics/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-google-analytics/labels{/name}","releases_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-google-analytics/releases{/id}","created_at":"2015-06-09T23:00:38Z","updated_at":"2016-01-11T23:44:23Z","pushed_at":"2016-01-12T23:30:29Z","git_url":"git://github.com/segment-integrations/analytics.js-integration-google-analytics.git","ssh_url":"git@github.com:segment-integrations/analytics.js-integration-google-analytics.git","clone_url":"https://github.com/segment-integrations/analytics.js-integration-google-analytics.git","svn_url":"https://github.com/segment-integrations/analytics.js-integration-google-analytics","homepage":"https://segment.com/docs/integrations/google-analytics/","size":29,"stargazers_count":4,"watchers_count":4,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":8,"forks":2,"open_issues":8,"watchers":4,"default_branch":"master"}},"base":{"label":"segment-integrations:master","ref":"master","sha":"6b97f4848c7e8eb24bff97129626dfd8bf78789a","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":37163239,"name":"analytics.js-integration-google-analytics","full_name":"segment-integrations/analytics.js-integration-google-analytics","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-google-analytics","description":"The Google Analytics analytics.js integration.","fork":false,"url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-google-analytics","forks_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-google-analytics/forks","keys_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-google-analytics/keys{/key_id}","collaborators_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-google-analytics/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-google-analytics/teams","hooks_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-google-analytics/hooks","issue_events_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-google-analytics/issues/events{/number}","events_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-google-analytics/events","assignees_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-google-analytics/assignees{/user}","branches_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-google-analytics/branches{/branch}","tags_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-google-analytics/tags","blobs_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-google-analytics/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-google-analytics/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-google-analytics/git/refs{/sha}","trees_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-google-analytics/git/trees{/sha}","statuses_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-google-analytics/statuses/{sha}","languages_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-google-analytics/languages","stargazers_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-google-analytics/stargazers","contributors_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-google-analytics/contributors","subscribers_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-google-analytics/subscribers","subscription_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-google-analytics/subscription","commits_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-google-analytics/commits{/sha}","git_commits_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-google-analytics/git/commits{/sha}","comments_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-google-analytics/comments{/number}","issue_comment_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-google-analytics/issues/comments{/number}","contents_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-google-analytics/contents/{+path}","compare_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-google-analytics/compare/{base}...{head}","merges_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-google-analytics/merges","archive_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-google-analytics/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-google-analytics/downloads","issues_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-google-analytics/issues{/number}","pulls_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-google-analytics/pulls{/number}","milestones_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-google-analytics/milestones{/number}","notifications_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-google-analytics/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-google-analytics/labels{/name}","releases_url":"https://api.github.com/repos/segment-integrations/analytics.js-integration-google-analytics/releases{/id}","created_at":"2015-06-09T23:00:38Z","updated_at":"2016-01-11T23:44:23Z","pushed_at":"2016-01-12T23:30:29Z","git_url":"git://github.com/segment-integrations/analytics.js-integration-google-analytics.git","ssh_url":"git@github.com:segment-integrations/analytics.js-integration-google-analytics.git","clone_url":"https://github.com/segment-integrations/analytics.js-integration-google-analytics.git","svn_url":"https://github.com/segment-integrations/analytics.js-integration-google-analytics","homepage":"https://segment.com/docs/integrations/google-analytics/","size":29,"stargazers_count":4,"watchers_count":4,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":8,"forks":2,"open_issues":8,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/segment-integrations/analytics.js-integration-google-analytics/pulls/15"},"html":{"href":"https://github.com/segment-integrations/analytics.js-integration-google-analytics/pull/15"},"issue":{"href":"https://api.github.com/repos/segment-integrations/analytics.js-integration-google-analytics/issues/15"},"comments":{"href":"https://api.github.com/repos/segment-integrations/analytics.js-integration-google-analytics/issues/15/comments"},"review_comments":{"href":"https://api.github.com/repos/segment-integrations/analytics.js-integration-google-analytics/pulls/15/comments"},"review_comment":{"href":"https://api.github.com/repos/segment-integrations/analytics.js-integration-google-analytics/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/segment-integrations/analytics.js-integration-google-analytics/pulls/15/commits"},"statuses":{"href":"https://api.github.com/repos/segment-integrations/analytics.js-integration-google-analytics/statuses/87acacedec8f0e802932e322a2df7ff30bed65ac"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":2,"additions":50,"deletions":12,"changed_files":1}}