mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-13 19:58:09 +00:00
Update posthog config to disable unneeded stuff (#6986)
This commit is contained in:
parent
11b6aa4820
commit
7190bacc0f
@ -4,7 +4,12 @@ import posthog from 'posthog-js'
|
|||||||
export class PosthogAnalyticProvider implements AnalyticProvider {
|
export class PosthogAnalyticProvider implements AnalyticProvider {
|
||||||
init(config: Record<string, any>): boolean {
|
init(config: Record<string, any>): boolean {
|
||||||
if (config.POSTHOG_API_KEY !== undefined && config.POSTHOG_API_KEY !== '' && config.POSTHOG_HOST !== null) {
|
if (config.POSTHOG_API_KEY !== undefined && config.POSTHOG_API_KEY !== '' && config.POSTHOG_HOST !== null) {
|
||||||
posthog.init(config.POSTHOG_API_KEY, { api_host: config.POSTHOG_HOST })
|
posthog.init(config.POSTHOG_API_KEY, {
|
||||||
|
api_host: config.POSTHOG_HOST,
|
||||||
|
autocapture: false,
|
||||||
|
capture_pageview: false,
|
||||||
|
capture_pageleave: false
|
||||||
|
})
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
|
Loading…
Reference in New Issue
Block a user