Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Analytics): use event properties correctly #164

Merged
merged 1 commit into from Mar 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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\\"}}]",
}
`;