Posthog widget embedding (#767)
* load analytics id from url in embedded mode Signed-off-by: Timo K <timok@element.io> * add start call in the widget code path Signed-off-by: Timo K <timok@element.io> * send group call id instead of call name Signed-off-by: Timo K <timok@element.io> * generate analyticsid based on account analyticsid This make it impossible to find users from the element web posthog instance in the element call instance * move registration type setup PosthogAnalytics.ts * Order identificaition and tracking. This fixes an issue that the widget version did not identify the user before sneding the first track event. Because start call is called right after app startup. Signed-off-by: Timo K <timok@element.io>
This commit is contained in:
parent
b60a92112f
commit
e3aa810230
7 changed files with 143 additions and 51 deletions
|
|
@ -75,6 +75,10 @@ export interface UrlParams {
|
|||
* The factor by which to scale the interface's font size.
|
||||
*/
|
||||
fontScale: number | null;
|
||||
/**
|
||||
* The Posthog analytics ID. It is only available if the user has given consent for sharing telemetry in element web.
|
||||
*/
|
||||
analyticsID: string | null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -130,6 +134,7 @@ export const getUrlParams = (
|
|||
lang: getParam("lang"),
|
||||
fonts: getAllParams("font"),
|
||||
fontScale: Number.isNaN(fontScale) ? null : fontScale,
|
||||
analyticsID: getParam("analyticsID"),
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue