tagreeve 0.9.2 → 0.10.0-rc.1

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 CHANGED
@@ -1,5 +1,40 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.10.0-rc.1
4
+
5
+ `npm i -g tagreeve@next` installs this release candidate. 0.10.0-rc.1 adds four built-in checks and one scenario option. It has no new command. The record stays at schema version 5. A 0.9 record reads as before.
6
+
7
+ ### What 0.10.0-rc.1 adds
8
+
9
+ - `consentModeOrder` warns when the first `consent default` comes after the first `config` of a frame and layer in the `dataLayer`, and when a Google hit that says a signal denied where the banner decision grants it goes out between the decision and its `consent update` push (#931, #1685).
10
+ - `consentMode` is a new scenario option. It names the Consent Mode setup the scenario expects, and `consentModeOrder` warns when the pushed setup differs (#931, #1685).
11
+ - `consentStateMismatch` warns when a Google hit says granted after the frame's `dataLayer` denied it with a `consent update` push. A hit within 2000 ms of a consent command of its frame is not judged (#932, #1686).
12
+ - `doubleSend` warns when one `ga4` or `meta` event is sent twice within 1000 ms with no page load between, from one frame or from several frames of the same page (#933, #1687).
13
+ - `clickIdHandover` warns when a click ID (`gclid`, `fbc`, `fbp`) differs between contexts (frame kind and page host), for example the main frame and an embedded frame (#1529, #1689). Google does not document gclid as a request field, so the code comments say the check reads it as the decoders see it.
14
+
15
+ The four checks print no value. Each check has default severity `warn` and can be set to `fail` in `options.builtins`.
16
+
17
+ ### Upgrading from 0.9
18
+
19
+ - **Four new built-in names.** `consentModeOrder`, `consentStateMismatch`, `doubleSend` and `clickIdHandover` are accepted in `options.builtins`. Their default is `warn`, so no run starts to fail.
20
+ - **New entries in results.** A run that has input for one of them gets a new entry in `results`, in `--json` and in the report. A script that counts `results` sees more entries on those runs.
21
+ - **One new scenario option.** `consentMode` is a scenario option and is not accepted in `config.yml`. A scenario that does not set it is not changed.
22
+ - **The record stays at schema version 5.** No field is added. A baseline made by 0.9 reads as before.
23
+
24
+ ### Known in 0.10.0-rc.1
25
+
26
+ Issues still open that you can meet, in addition to those in 0.9.2:
27
+
28
+ - #931: a default pushed after `gtm.js`, and a hit sent on a later page before the CMP restores the stored update, are not judged.
29
+ - #932: a granted hit after a reject whose denial is a default push only is not judged. Whether a CMP template API or TCF raises consent outside the `dataLayer` is not yet known.
30
+ - #933: `google-ads` pairs, and `ga4` pairs from two frames with different client IDs, are not judged.
31
+ - #935, #938 and #939 (value classes in `dataLayer` shapes, linking a push to its hits, and comparing values of non-identity keys) are not built.
32
+ - There is no user event map for `doubleSend`, no click IDs read from cookies, no emulated visitor region, no `wait_for_update` value check and no check per GTM container.
33
+ - The `doubleSend` and update windows are fixed at 1000 ms and 2000 ms.
34
+ - #1683: an update push more than 2 s after the banner action is not judged for the update gap.
35
+ - #1684: `consentModeOrder` passes saying the setup was found when nothing was compared.
36
+ - #1688: `fbc` is compared as a whole string, so one click with two creation times warns.
37
+
3
38
  ## 0.9.2
4
39
 
5
40
  `npm i -g tagreeve` installs this release. 0.9.2 is a patch release after 0.9.1. It has no new command, option or record field. The record stays at schema version 5. A 0.9.1 record reads as before.
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.9 (`0.9.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). 0.7.0 adds the `earlyIdentityPush`, `idHandover` and `serverContainerRejected` checks and `dataLayer:` rules. 0.8.0-rc.1 adds a consent audit: `suite --consent`, identifier canaries and the `identifierRoute` check. 0.8.0 is rc.4 with the release prep and no code change; it was field-tested on a real Shopify store with a first-party server container (rc.1 to rc.4). 0.9.0-rc.1 fixes server container links, canaries, consent matrix names and `dataLayer` loaders, and decodes Pinterest Conversions API calls. 0.9.0 is rc.1 with the release prep and no code change; it was field-tested on a real store with no regressions. 0.9.1 fixes nested variables and the transform of a padded digest. 0.9.2 fixes a `pinterest-capi` `body.only` rule and a baseline gcd split, and warns on an undeclared `{name}` in a variable value. 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.
12
+ > **Status: 0.10 (`0.10.0-rc.1`).** 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). 0.7.0 adds the `earlyIdentityPush`, `idHandover` and `serverContainerRejected` checks and `dataLayer:` rules. 0.8.0-rc.1 adds a consent audit: `suite --consent`, identifier canaries and the `identifierRoute` check. 0.8.0 is rc.4 with the release prep and no code change; it was field-tested on a real Shopify store with a first-party server container (rc.1 to rc.4). 0.9.0-rc.1 fixes server container links, canaries, consent matrix names and `dataLayer` loaders, and decodes Pinterest Conversions API calls. 0.9.0 is rc.1 with the release prep and no code change; it was field-tested on a real store with no regressions. 0.9.1 fixes nested variables and the transform of a padded digest. 0.9.2 fixes a `pinterest-capi` `body.only` rule and a baseline gcd split, and warns on an undeclared `{name}` in a variable value. 0.10.0-rc.1 adds the `consentModeOrder`, `consentStateMismatch`, `doubleSend` and `clickIdHandover` checks. 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,6 +17,8 @@ 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.10.0-rc.1:** four new built-in checks and one scenario option. `consentModeOrder` warns when the first `consent default` comes after the first `config` of a frame and layer, or a Google hit that says a signal denied where the banner decision grants it goes out between the decision and its update. `consentStateMismatch` warns when a Google hit says granted after the frame's `dataLayer` denied it with a `consent update` push, outside 2000 ms of a consent command. `doubleSend` warns when one GA4 or Meta event is sent twice within 1000 ms with no page load between, from one frame or from several frames of the same page. `clickIdHandover` warns when a click ID differs between contexts (frame kind and page host), for example the main frame and an embedded frame. The scenario option `options.consentMode` names the Consent Mode setup a scenario expects. All four checks warn by default and can be set to `fail`. The four checks print no value. The record stays at schema version 5. `npm i -g tagreeve@next` installs it. What is new is in [CHANGELOG.md](CHANGELOG.md) under 0.10.0-rc.1.
21
+
20
22
  > **In 0.9.2:** a patch release after 0.9.1, with no new command, option or record field. A `body.only` rule on `pinterest-capi` no longer fails on the five transport fields. A gcd letter split with a count change is no longer drift in a baseline, so a `run --baseline` that exited 1 for it passes. An undeclared `{name}` in a variable value prints a warning on stderr. The record stays at schema version 5, and a 0.9.1 record reads as before. `npm i -g tagreeve` installs it. On arm64, run `tagreeve server-container build` after the upgrade. What is new is in [CHANGELOG.md](CHANGELOG.md) under 0.9.2.
21
23
  >
22
24
  > **In 0.9.1:** a patch release after 0.9.0, with no new command, option or record field. A `{name}` inside a variable value is now filled, so a start URL or visit path that uses a nested variable opens the filled page, and a variable cycle exits 2. A padded Base64 SHA-256 digest of a canary reads transform `sha256` in an `identifierRoute` flag. The record stays at schema version 5, and a 0.9.0 record reads as before. `npm i -g tagreeve` installs it. On arm64, run `tagreeve server-container build` after the upgrade. What is new is in [CHANGELOG.md](CHANGELOG.md) under 0.9.1.
@@ -212,6 +214,7 @@ options:
212
214
  - `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.
213
215
  - `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.
214
216
  - `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.
217
+ - `consentModeOrder` is a built-in check. It warns when a `consent default` comes after `config` in the `dataLayer`, when a Google hit that denies a signal the banner decision grants goes out between the decision and the `consent update` push, and, with the scenario option `options.consentMode`, when the pushed setup differs from the one the scenario expects. It reads the recorded `dataLayer` pushes and the Google browser hits (their times and consent signals), and prints no pushed value. It is `warn` by default. See [consentModeOrder](docs/cli.md#consentmodeorder).
215
218
  - `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.
216
219
  - `serverContainerRejected` is a built-in check for runs with `--server-container`. It warns when more than half of the browser requests to the container, and at least 2, get status 400 or higher or no answer. Its message gives counts and status codes and never a path or ID. It is `warn` by default. Set it to `fail` to fail the run.
217
220
  - `identifierRoute` is a built-in check for runs with `canaries: true`. It fails when a fake click ID or the run's fake email or phone reaches a host outside the site while consent forbids it, and warns when only the page URL carries it. A pass means that nothing was found in the searched forms of the URL, body and decoded fields. Headers, including Referer and Cookie, are not searched. `builtins: { identifierRoute: warn }` makes every finding a warning.