tagreeve 0.6.2 → 0.7.0-rc.2
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/README.md +10 -5
- package/dist/cli.js +637 -226
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
Agent-first testing for tags and consent. Tagreeve plays a visitor in a real browser, records every tracking hit the site sends, and checks the result against what you expect. Web tag reports (which GTM web tags fired) come from a GTM template you install. Server tag reports are planned.
|
|
11
11
|
|
|
12
|
-
> **Status: 0.
|
|
12
|
+
> **Status: 0.7 (`0.7.0-rc.2`).** Tagreeve plays a visitor in Chromium, records and decodes hits, answers the consent banner, checks YAML expectations and writes a JSONL record. 0.3 adds rules on payload fields and cookies, a `deniedIdentifiers` check, `tagreeve suite`, an HTML report, a Done control for handoff steps, role-based locators and a `select` step. 0.4 adds handoffs that end by themselves, an opt-in test payment step, baselines, a viewport option and fake identities by country. 0.5 adds `--server-container`, which runs your own server container in Docker and records what it sends to each vendor, a Conversions API decoder, several stores in one suite and platform hosts for Shopify. 0.6.0-rc.1 adds path defaults, `tagreeve init`, `tagreeve/config.yml`, `--label`, default baseline paths and `suite --baseline`, exact links between server container calls and browser hits by client ID, and the frame of each `dataLayer` push. 0.6.0-rc.2 adds web tag reports, `tagreeve template web`, `tag` rules, `expectedTags`, masked `dataLayer` push shapes in `diff` and baselines, and the `consentModeSetup` check. 0.6.0-rc.3 fixes the reporter in real GTM, keeps the `dataLayer` hook working when a page replaces `push`, adds push kinds and a `dataLayerIncomplete` flag, and sends handoff text to stderr. 0.6.0 is rc.3 with the release prep and no code change; it was field-tested on a real store with a real GTM web container in a workspace preview (rc.2 and rc.3). The rest of this README describes where Tagreeve is going, and marks what is not built yet. The design is in [docs/design.md](docs/design.md). Feedback is welcome in issues.
|
|
13
13
|
>
|
|
14
14
|
> **In 0.1:** `tagreeve run` with `stub` and `live` network modes; consent epochs, with withdrawals labelled apart from first rejects; seeded fake identities, hash checks and leak detection; decoders for GA4, Google Ads, Meta, Stape custom loader and a minimal server-container data client; banner handling through autoconsent; expectations; JSONL output.
|
|
15
15
|
>
|
|
@@ -17,7 +17,9 @@ Agent-first testing for tags and consent. Tagreeve plays a visitor in a real bro
|
|
|
17
17
|
>
|
|
18
18
|
> **In 0.3:** `body.has` and `body.only` rules on the field names of a hit; `cookie` rules; a `deniedIdentifiers` check that fails when an identifier goes out on a denied hit; `tagreeve suite` runs a folder of scenarios against several GTM builds; `tagreeve report` writes an HTML report of one run or a suite; a Done button in the handoff window; `click` and `wait` by role and name or from a list of selectors; a `select` step; the `server` network mode; record schema version 2. `deniedIdentifiers` fails by default, so a run that passed in 0.2 can exit 1. See [CHANGELOG.md](CHANGELOG.md).
|
|
19
19
|
>
|
|
20
|
-
> **In 0.
|
|
20
|
+
> **In 0.7.0-rc.2:** rc.2 fixes the `earlyIdentityPush` masking, the `dataLayer` rule messages and `must` and `mustNot` rules on pushes past the shape caps. It has two new built-in checks and a rule kind for `dataLayer` pushes. `earlyIdentityPush` warns when a push carries the run's own test identity before consent. `idHandover` warns when the GA4 client or session ID differs between two contexts. Both warn by default and can be set to `fail`. `dataLayer:` rules check which pushes a page makes. A `consent default` pushed as a plain object now counts for `consentModeSetup`. `diff` keeps a cross-epoch join. The fixture site has a plain GTM demo shop. The record stays at schema version 5. `npm i -g tagreeve@next` installs it. To upgrade from 0.6.2, read "Upgrading from 0.6.2" in [CHANGELOG.md](CHANGELOG.md). What is still open is in the same file under "Known in 0.7.0-rc.1".
|
|
21
|
+
>
|
|
22
|
+
> **In 0.6.2:** fixes after 0.6.1, with no new command and no new option. A test payment ends by its deadline when a card frame stops answering. A scoped `must` rule can now warn where 0.6.1 failed, so a run can exit 0. `diff --json` has `renamedFrom` and `pushKind`. `tagreeve init` creates nothing when a target is refused. The record stays at schema version 5. `npm i -g tagreeve` installs it. To upgrade from 0.6.1, read "Upgrading from 0.6.1" in [CHANGELOG.md](CHANGELOG.md). What is still open is in the same file under "Known in 0.6.2".
|
|
21
23
|
>
|
|
22
24
|
> **In 0.6.1:** fixes after 0.6.0, with no new command and no new option. A `dataLayer` push that holds data not from the run identity gets a `possibleRealDataPush` warning that never changes the exit code. `diff` names events as recorded. A few baseline, `init`, `wait` and server link cases changed. The record stays at schema version 5. `npm i -g tagreeve` installs it. To upgrade from 0.6.0, read "Upgrading from 0.6.0" in [CHANGELOG.md](CHANGELOG.md). What is still open is in the same file under "Known in 0.6.1".
|
|
23
25
|
>
|
|
@@ -92,15 +94,15 @@ tagreeve run scenarios/undecided-visitor.yml --site https://staging.example.com
|
|
|
92
94
|
## Install
|
|
93
95
|
|
|
94
96
|
```bash
|
|
95
|
-
npm i -g tagreeve
|
|
97
|
+
npm i -g tagreeve@next
|
|
96
98
|
tagreeve install-browser
|
|
97
99
|
```
|
|
98
100
|
|
|
99
|
-
Node 22.18 or later. `npm i -g tagreeve` installs the newest release. Other ways to install, from a git tag or a tarball, are in [docs/cli.md](docs/cli.md).
|
|
101
|
+
Node 22.18 or later. `npm i -g tagreeve@next` installs the newest release candidate. Other ways to install, from a git tag or a tarball, are in [docs/cli.md](docs/cli.md).
|
|
100
102
|
|
|
101
103
|
## Quick start
|
|
102
104
|
|
|
103
|
-
1. `npm i -g tagreeve`
|
|
105
|
+
1. `npm i -g tagreeve@next`
|
|
104
106
|
2. `tagreeve install-browser`. In a project folder, `tagreeve init` makes `tagreeve/scenarios/` and `tagreeve/baselines/`, writes a starter `tagreeve/config.yml` and keeps `tagreeve/runs/` out of git.
|
|
105
107
|
3. Write `scenario.yml`:
|
|
106
108
|
|
|
@@ -187,9 +189,12 @@ options:
|
|
|
187
189
|
|
|
188
190
|
- `body.has` matches hits by the names of the fields they sent, and `body.only` is an allowlist of field names. They read names, never values.
|
|
189
191
|
- `cookie` checks which cookies were set, by name, before or after consent. In `stub` mode a stubbed endpoint sets no cookies, so use `--network server` with `options.serverHosts` to see the cookies of a server container.
|
|
192
|
+
- `dataLayer` checks the pushes a page makes to its data layer, by event name, key paths and types, never by value. `{ dataLayer: { event: purchase, has: [ecommerce.transaction_id] } }` under `must` needs a purchase push with that path. It takes `before`, `in`, `after` and `from` like `cookie`. Copy the paths from the `dataLayer` shapes in `--json`. See [Rules on dataLayer pushes](docs/cli.md#rules-on-datalayer-pushes).
|
|
190
193
|
- `deniedIdentifiers` is a built-in check. It fails when a hit carries `user_id`, `uid`, a hashed `user_data` field or another identifier while the matching consent signal is denied. It is `fail` by default. Set it to `warn` to keep the old exit code while you fix the cause.
|
|
191
194
|
- `earlyIdentifiers` is a built-in check. It warns when a hit sent before the first consent answer carries an identifier and its consent signal is unknown, for example a hashed email on a page with no Consent Mode default. It is `warn` by default, so the exit code stays the same. Set it to `fail` to fail the run.
|
|
192
195
|
- `consentModeSetup` is a built-in check. It warns when a Google hit shows a Consent Mode signal that was never set, for example a default without `ad_user_data` and `ad_personalization`. It reads the `gcd` value of each hit. It is `warn` by default. Set it to `fail` to fail the run.
|
|
196
|
+
- `idHandover` is a built-in check. It warns when the GA4 client ID or session ID does not carry over between contexts, such as a checkout on another host or in a frame. It names the measurement ID and the contexts and never prints an ID. It is `warn` by default. Set it to `fail` to fail the run.
|
|
197
|
+
- `earlyIdentityPush` is a built-in check. It warns when a `dataLayer` push carries the run's own test email or phone, or a hash of either, while consent is not given. It never prints the value. It is `warn` by default. Set it to `fail` to fail the run.
|
|
193
198
|
- `click` and `wait` take `{ role, name }` or `{ any: [selectors] }`, so a theme change does not break every scenario. `select` chooses an option of a `<select>` by value, then by label, and reads it back.
|
|
194
199
|
|
|
195
200
|
## Tracker list
|