Disable posthog in widgets (#726)
Co-authored-by: Timo K <timok@element.io> Co-authored-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
@@ -113,7 +113,11 @@ export class PosthogAnalytics {
|
||||
project_api_key: Config.instance.config.posthog?.api_key,
|
||||
api_host: Config.instance.config.posthog?.api_host,
|
||||
};
|
||||
if (posthogConfig.project_api_key && posthogConfig.api_host) {
|
||||
if (
|
||||
posthogConfig.project_api_key &&
|
||||
posthogConfig.api_host &&
|
||||
PosthogAnalytics.getPlatformProperties().matrixBackend === "jssdk"
|
||||
) {
|
||||
this.posthog.init(posthogConfig.project_api_key, {
|
||||
api_host: posthogConfig.api_host,
|
||||
autocapture: false,
|
||||
|
||||
Reference in New Issue
Block a user