1
0
Fork 0
mirror of synced 2024-06-01 18:20:18 +12:00

track pageviews in PH, add job role and company size into intercom

This commit is contained in:
Martin McKeaveney 2021-11-10 19:40:55 +01:00
parent 0202adaa60
commit 3ec7283638
2 changed files with 4 additions and 4 deletions

View file

@ -12,7 +12,7 @@ export default class PosthogClient {
posthog.init(this.token, {
autocapture: false,
capture_pageview: false,
capture_pageview: true,
api_host: this.url,
})
posthog.set_config({ persistence: "cookie" })

View file

@ -57,11 +57,11 @@ export function createAuthStore() {
analytics.showChat({
email: user.email,
created_at: (user.createdAt || Date.now()) / 1000,
name: user.name,
name: user.account?.name,
user_id: user._id,
tenant: user.tenantId,
"Company size": user.size,
"Job role": user.profession,
"Company size": user.account?.size,
"Job role": user.account?.profession,
})
})
}