@analitikisler/ai-tag-debugger 0.22.4 → 0.22.6
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 +16 -0
- package/README.md +26 -3
- package/README.tr.md +26 -3
- package/package.json +1 -1
- package/src/agent.js +7 -2
- package/src/audit.js +4 -1
- package/src/browser.js +84 -17
- package/src/checks.js +18 -1
- package/src/cli.js +48 -0
- package/src/consent.js +1 -1
- package/src/containers.js +60 -3
- package/src/help.js +20 -1
- package/src/html/scope.js +1 -1
- package/src/i18n.js +30 -0
- package/src/journeys.js +8 -1
- package/src/login.js +91 -0
- package/src/mcp.js +29 -9
- package/src/parsers.js +2 -0
- package/src/report.js +4 -4
- package/src/schema.js +1 -0
package/src/parsers.js
CHANGED
|
@@ -125,6 +125,8 @@ export function parseGa4(url, postData) {
|
|
|
125
125
|
protocol: protocolOf(merged),
|
|
126
126
|
...(items.length ? { items } : {}),
|
|
127
127
|
...(autoEvents.length ? { autoEvents } : {}),
|
|
128
|
+
// Whether the hit carried the site's user ID (uid), not the ID itself: the login check only needs to know.
|
|
129
|
+
...(merged.get("uid") ? { hasUserId: true } : {}),
|
|
128
130
|
...(user.length ? { userFields: Object.fromEntries(user) } : {}),
|
|
129
131
|
url,
|
|
130
132
|
};
|
package/src/report.js
CHANGED
|
@@ -398,10 +398,10 @@ function mdInventory(m, runs) {
|
|
|
398
398
|
return lines;
|
|
399
399
|
}
|
|
400
400
|
|
|
401
|
-
/** A container row's version, size and load time, or that it failed to load, in a few words. */
|
|
401
|
+
/** A container row's version, size and load time, or that it failed to load, and whether it never ran, in a few words. */
|
|
402
402
|
export function scriptCell(c, r) {
|
|
403
403
|
if (r.failed) return c.failed(r.failed);
|
|
404
|
-
return [r.version && c.version(r.version), r.bytes && c.size(r.bytes), r.ms != null && c.loadTime(r.ms)].filter(Boolean).join(", ");
|
|
404
|
+
return [r.version && c.version(r.version), r.bytes && c.size(r.bytes), r.ms != null && c.loadTime(r.ms), r.ran === false && c.neverRan].filter(Boolean).join(", ");
|
|
405
405
|
}
|
|
406
406
|
|
|
407
407
|
/** The events iframes posted to the page and what the page did next, one row each. Omitted when there were none. */
|
|
@@ -444,8 +444,8 @@ function mdContainers(m, runs) {
|
|
|
444
444
|
const c = m.ui.containers;
|
|
445
445
|
const lines = [`## ${m.ui.containersTitle}`, "", `| ${m.ui.containerCol} | ${m.ui.sourceCol} | ${m.ui.layerCol} | ${m.ui.servedCol} | ${m.ui.scriptCol} | ${m.ui.pagesCol} |`, "|---|---|---|---|---|---|"];
|
|
446
446
|
for (const r of rows.slice(0, MD_INVENTORY_ROWS)) {
|
|
447
|
-
const served = r.served === "google" ? c.served.google : `${c.served.site} (${r.host})`;
|
|
448
|
-
lines.push(`| ${mdText(r.id)} (${c.script[r.script]}) | ${mdText(c.kinds[r.kind](r.by))}${r.frame ? `, ${mdText(c.iframe(r.frame.origin, r.frame.party))}` : ""}${r.environment ? `, ${mdText(c.environment(r.environment))}` : ""} | ${mdText(r.layer)} | ${mdText(served)} | ${mdText(scriptCell(c, r)) || "–"} | ${r.pages.length} |`);
|
|
447
|
+
const served = !r.served ? "–" : r.served === "google" ? c.served.google : `${c.served.site} (${r.host})`;
|
|
448
|
+
lines.push(`| ${mdText(r.id)} (${c.script[r.script]}) | ${mdText(c.kinds[r.kind](r.by))}${r.frame ? `, ${mdText(c.iframe(r.frame.origin, r.frame.party))}` : ""}${r.environment ? `, ${mdText(c.environment(r.environment))}` : ""} | ${r.layer ? mdText(r.layer) : "–"} | ${mdText(served)} | ${mdText(scriptCell(c, r)) || "–"} | ${r.pages.length} |`);
|
|
449
449
|
}
|
|
450
450
|
if (rows.length > MD_INVENTORY_ROWS) lines.push("", m.ui.md.moreIn(rows.length - MD_INVENTORY_ROWS, "report.html"));
|
|
451
451
|
lines.push("");
|
package/src/schema.js
CHANGED
|
@@ -68,6 +68,7 @@ export const CONFIG_SCHEMA = z.looseObject({
|
|
|
68
68
|
viewports: z.array(z.enum(Object.keys(VIEWPORTS))).optional(),
|
|
69
69
|
journeys: z.array(JOURNEY_SCHEMA).optional(),
|
|
70
70
|
allowed_hosts: names.optional(),
|
|
71
|
+
session_file: text.optional(),
|
|
71
72
|
providers: z.union([names, text], { error: 'must be a list of platforms, e.g. ["ga4", "meta"]' }).optional(),
|
|
72
73
|
detect_providers: flag.optional(),
|
|
73
74
|
campaign_checks: flag.optional(),
|