Skip to content

Commit

Permalink
fix(Analytics): use event properties correctly (#164)
Browse files Browse the repository at this point in the history
  • Loading branch information
jakebolam committed Mar 16, 2019
1 parent 97d35c8 commit e32e442
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions src/utils/Analytics.js
Expand Up @@ -44,11 +44,9 @@ class Analytics {
const event = {
user_id: this.user,
event_type: eventName,
user_properties: {
event_properties: {
repo: this.repo,
owner: this.owner,
},
event_properties: {
funnel_id: this.funnelId,
...metadata,
},
Expand Down
2 changes: 1 addition & 1 deletion test/utils/__snapshots__/Analytics.test.js.snap
Expand Up @@ -3,6 +3,6 @@
exports[`Analytics Analytics 1`] = `
Object {
"api_key": "mock api key",
"event": "[{\\"user_id\\":\\"mockusername\\",\\"event_type\\":\\"my-event\\",\\"user_properties\\":{\\"repo\\":\\"all-contributors-bot\\",\\"owner\\":\\"all-contributors\\"},\\"event_properties\\":{\\"funnel_id\\":\\"mockFunnelId\\"}}]",
"event": "[{\\"user_id\\":\\"mockusername\\",\\"event_type\\":\\"my-event\\",\\"event_properties\\":{\\"repo\\":\\"all-contributors-bot\\",\\"owner\\":\\"all-contributors\\",\\"funnel_id\\":\\"mockFunnelId\\"}}]",
}
`;

0 comments on commit e32e442

Please sign in to comment.