Skip to content

feat(datalayer): dataLayer inspector with GA4, Consent Mode, PII and snapshots - #18

Merged
maxgfr merged 4 commits into
release-nextfrom
issue-11-datalayer
Nov 20, 2026
Merged

maxgfr merged 4 commits into
release-nextfrom
issue-11-datalayer

Conversation

@maxgfr

@maxgfr maxgfr commented Nov 20, 2026

Copy link
Copy Markdown
Owner

A read-only dataLayer inspector, like the JSON-LD Tester dataLayer tab.

  • Reads dataLayer and the other layers GTM names in the MAIN world without calling or wrapping anything; gtag arguments, callbacks, DOM nodes and cycles are serialized safely.
  • Counters: issues, events, unique events, layers, consent commands, containers.
  • GA4 checks: purchase/refund without transaction_id, non-numeric or zero value, currency not ISO 4217, items[] without item_id/item_name, duplicate events and transaction ids, ecommerce: null not cleared, legacy Universal Analytics structure.
  • Consent Mode v2: missing default, update before default, missing ad_user_data / ad_personalization, invalid values.
  • Personal data (e-mail, phone, IBAN with mod-97, cards with Luhn) reported by path and masked everywhere: panel, JSON view, reports, snapshots.
  • Cross-check of items[] with the JSON-LD Product (price, currency, SKU).
  • Snapshots (50, masked, local) with compare: added, removed, duplicated, changed, also against the current read.

Closes #11

…ents, Consent Mode and PII

readDataLayer runs in the MAIN world and copies window.dataLayer and the other
layers GTM names into plain JSON (gtag arguments flagged, functions, DOM nodes
and cycles as placeholders, depth and 1 MB caps) without calling or wrapping
push. analyzeDataLayer turns entries into events and gtag commands, checks GA4
ecommerce parameters, duplicates, legacy Universal Analytics, Consent Mode v2,
finds e-mails, phone numbers, IBANs and card numbers by path and masks them,
cross-checks items[] with the JSON-LD Product, and compares snapshots.
…sent timeline and snapshots

Inspect › dataLayer shows issues, containers and layers, every entry as a
filterable tree, the consent timeline and a masked JSON view; Save snapshot
keeps up to 50 masked reads in browser.storage.local to compare with each
other or with the current read. Copy report and Copy for agent give paths and
fixes, never a personal value.
@maxgfr
maxgfr merged commit fb08214 into release-next Nov 20, 2026
2 checks passed
@maxgfr
maxgfr deleted the issue-11-datalayer branch November 20, 2026 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant