|
@@ -45,9 +45,13 @@ export class IHistory {
|
|
|
}
|
|
|
const mediciRegisterIds = (window as any).mediciRegisterIds;
|
|
|
if (!Array.from(mediciRegisterIds).includes(this._appId) && this._appId) {
|
|
|
- global.document.addEventListener('readystatechange', this.handleReadystatechange.bind(this), true);
|
|
|
- global.history.pushState = hook(global.history, 'pushState', this.handlePushState.bind(this));
|
|
|
- global.history.replaceState = hook(global.history, 'replaceState', this.handlePushState.bind(this));
|
|
|
+ // console.log('注册pageView');
|
|
|
+ if (!this._sdk._stopTrack) {
|
|
|
+ global.document.addEventListener('readystatechange', this.handleReadystatechange.bind(this), true);
|
|
|
+ global.history.pushState = hook(global.history, 'pushState', this.handlePushState.bind(this));
|
|
|
+ global.history.replaceState = hook(global.history, 'replaceState', this.handlePushState.bind(this));
|
|
|
+ }
|
|
|
+
|
|
|
(window as any).mediciRegisterIds.push(this._appId);
|
|
|
}
|
|
|
|