Skip to content

Commit 6f59e1e

Browse files
committed
LogRocket.identify
1 parent 1798ffa commit 6f59e1e

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

src/lib/withAuth.js

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { ApolloClient } from 'apollo-client'
66
import gql from 'graphql-tag'
77
import auth0 from 'auth0-js'
88
import { initAuthHelpers, login, logout } from 'auth0-helpers'
9-
import pick from 'lodash/pick'
9+
import LogRocket from 'logrocket'
1010

1111
import { associateToken } from '../lib/payment'
1212

@@ -85,10 +85,15 @@ function withAuth(BaseComponent) {
8585
}
8686

8787
associateToken()
88-
window.analytics.identify(
89-
currentUser.id,
90-
pick(currentUser, ['name', 'email', 'hasPurchased'])
91-
)
88+
const { id, name, email, hasPurchased } = currentUser
89+
const userData = {
90+
name,
91+
email,
92+
hasPurchased
93+
}
94+
95+
window.analytics.identify(id, userData)
96+
LogRocket.identify(id, userData)
9297

9398
this.lastCurrentUser = currentUser
9499
}

0 commit comments

Comments
 (0)