@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/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(),