fix(sdk): send initial screen view after next tick

This commit is contained in:
Carl-Gerhard Lindesvärd
2024-10-29 21:06:27 +01:00
parent 30c1626b52
commit a187dcd126
2 changed files with 2 additions and 3 deletions

View File

@@ -38,6 +38,7 @@ export class OpenPanel extends OpenPanelBase {
if (this.options.trackScreenViews) {
this.trackScreenViews();
setTimeout(() => this.screenView(), 0);
}
if (this.options.trackOutgoingLinks) {
@@ -88,8 +89,6 @@ export class OpenPanel extends OpenPanelBase {
return;
}
this.screenView();
const oldPushState = history.pushState;
history.pushState = function pushState(...args) {
const ret = oldPushState.apply(this, args);