track pageviews in PH, add job role and company size into intercom
This commit is contained in:
parent
34e04e3837
commit
aae287e6e8
|
@ -12,7 +12,7 @@ export default class PosthogClient {
|
||||||
|
|
||||||
posthog.init(this.token, {
|
posthog.init(this.token, {
|
||||||
autocapture: false,
|
autocapture: false,
|
||||||
capture_pageview: false,
|
capture_pageview: true,
|
||||||
api_host: this.url,
|
api_host: this.url,
|
||||||
})
|
})
|
||||||
posthog.set_config({ persistence: "cookie" })
|
posthog.set_config({ persistence: "cookie" })
|
||||||
|
|
|
@ -57,11 +57,11 @@ export function createAuthStore() {
|
||||||
analytics.showChat({
|
analytics.showChat({
|
||||||
email: user.email,
|
email: user.email,
|
||||||
created_at: (user.createdAt || Date.now()) / 1000,
|
created_at: (user.createdAt || Date.now()) / 1000,
|
||||||
name: user.name,
|
name: user.account?.name,
|
||||||
user_id: user._id,
|
user_id: user._id,
|
||||||
tenant: user.tenantId,
|
tenant: user.tenantId,
|
||||||
"Company size": user.size,
|
"Company size": user.account?.size,
|
||||||
"Job role": user.profession,
|
"Job role": user.account?.profession,
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue