@analitikisler/ai-tag-debugger 0.7.3 → 0.7.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5 -0
- package/package.json +1 -1
- package/src/browser.js +14 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.7.4 (2026-10-14)
|
|
4
|
+
|
|
5
|
+
- Saving a site no longer fails on pages that keep a request open after they are left (a GA4 hit to `www.google.com/g/collect`, for example). The recording waited for it until the 30-second limit and was then skipped, so the site was not saved. The browser's pages are now closed before the recording is written.
|
|
6
|
+
- Fewer test hits from popups reach the real account while a recording is written.
|
|
7
|
+
|
|
3
8
|
## 0.7.3 (2026-10-13)
|
|
4
9
|
|
|
5
10
|
- `replay` no longer crashes with `NavigationAbortedError: net::ERR_BLOCKED_BY_CLIENT` when a saved page redirects to another site. The redirect is refused again, so the journey stays unfinished as it was saved, and the other sites are still replayed.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@analitikisler/ai-tag-debugger",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.4",
|
|
4
4
|
"description": "Open-source AI agent that QA-tests your website's analytics, ad and consent tracking (GA4, GTM, Google Ads, Meta, TikTok). Bring your own model (Claude, OpenAI, Gemini) or use it from your chat app over MCP.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
package/src/browser.js
CHANGED
|
@@ -791,7 +791,20 @@ export class AuditSession {
|
|
|
791
791
|
async close() {
|
|
792
792
|
// Leaving the page first cancels what it is still loading (the recording would otherwise wait for it),
|
|
793
793
|
// while tracking requests sent on the way out are still answered locally.
|
|
794
|
-
if (this.opts.recordHar
|
|
794
|
+
if (this.opts.recordHar && this.context) {
|
|
795
|
+
await this.page?.goto("about:blank", { timeout: 5000 }).catch(() => {});
|
|
796
|
+
// The recording also waits for requests the browser holds for an open page, such as a tracking hit
|
|
797
|
+
// sent as the page was left, which can stay open for good. Once their page is closed it stops waiting.
|
|
798
|
+
// A moment first lets hits already sent be answered locally: once their page is closed,
|
|
799
|
+
// the browser would send them on its own.
|
|
800
|
+
await new Promise((resolve) => setTimeout(resolve, 1000));
|
|
801
|
+
let pagesTimer;
|
|
802
|
+
await Promise.race([
|
|
803
|
+
Promise.all(this.context.pages().map((p) => p.close().catch(() => {}))),
|
|
804
|
+
new Promise((resolve) => (pagesTimer = setTimeout(resolve, 5000))),
|
|
805
|
+
]);
|
|
806
|
+
clearTimeout(pagesTimer);
|
|
807
|
+
}
|
|
795
808
|
if (this.opts.replayHar) {
|
|
796
809
|
// The recording's own route callbacks would otherwise throw for requests still in flight once the
|
|
797
810
|
// browser is gone. Without routes, those go nowhere (see start). Elsewhere the routes stay, so a
|