send posthog callEnded events instantly in embedded mode (prohibit missing events) (#816)
Signed-off-by: Timo K <timok@element.io> Co-authored-by: Timo K <timok@element.io>
This commit is contained in:
parent
1f5c22e325
commit
05be247946
3 changed files with 21 additions and 15 deletions
|
|
@ -54,10 +54,6 @@ export interface IPosthogEvent {
|
|||
$set_once?: void;
|
||||
}
|
||||
|
||||
export interface IPostHogEventOptions {
|
||||
timestamp?: Date;
|
||||
}
|
||||
|
||||
export enum Anonymity {
|
||||
Disabled,
|
||||
Anonymous,
|
||||
|
|
@ -373,7 +369,7 @@ export class PosthogAnalytics {
|
|||
|
||||
public async trackEvent<E extends IPosthogEvent>(
|
||||
{ eventName, ...properties }: E,
|
||||
options?: IPostHogEventOptions
|
||||
options?: CaptureOptions
|
||||
): Promise<void> {
|
||||
if (this.identificationPromise) {
|
||||
// only make calls to posthog after the identificaion is done
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue