pixellint 0.16.0 → 0.17.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/README.md CHANGED
@@ -1,8 +1,9 @@
1
1
  # pixellint
2
2
 
3
- Validator for pixels, postbacks, and tracking URLs, as a WASM-backed npm
4
- package. Same engine, same rule ids, and same evidence levels as the
5
- [`pixellint` CLI](https://crates.io/crates/pixellint).
3
+ Validator for pixels, postbacks, conversion API payloads, and tracking URLs,
4
+ as a WASM-backed npm package. Same engine, same rule ids, and same evidence
5
+ levels as the [`pixellint` CLI](https://crates.io/crates/pixellint). Paste a
6
+ URL or a CAPI JSON body at [pixellint.org](https://pixellint.org).
6
7
 
7
8
  ```bash
8
9
  npm install pixellint
@@ -11,18 +12,23 @@ npm install pixellint
11
12
  ```js
12
13
  import { validate, isOk } from "pixellint";
13
14
 
14
- const summary = validate("https://www.facebook.com/tr?ev=Purchase");
15
+ const pixel = validate("https://www.facebook.com/tr?ev=Purchase");
16
+ isOk(pixel); // false: missing Pixel ID
15
17
 
16
- isOk(summary); // false
17
- summary.reports.flatMap((report) => report.violations).map((v) => v.code);
18
- // ["vendor.meta.param.id.missing"]
18
+ const capi = validate(
19
+ JSON.stringify({
20
+ data: [{ event_name: "Purchase", event_time: 1770000000000, action_source: "website" }],
21
+ }),
22
+ { kind: "json" },
23
+ );
24
+ isOk(capi); // false: event_time is milliseconds, Meta wants seconds
19
25
  ```
20
26
 
21
27
  Every finding carries a stable `code`, a `severity`, a `fix_hint`, the byte
22
28
  range it applies to, and the document it came from:
23
29
 
24
30
  ```js
25
- const [finding] = summary.reports.flatMap((report) => report.violations);
31
+ const [finding] = pixel.reports.flatMap((report) => report.violations);
26
32
 
27
33
  finding.severity; // "error"
28
34
  finding.source.level; // "official_vendor"
@@ -35,8 +41,8 @@ finding.targets[0]; // { component: "whole_url", start: 0, end: 46, ... }
35
41
  - URL conformance, transport, credentials, fragments, and ad-tech macro handling
36
42
  - IAB consent signals: TCF `gdpr` and `gdpr_consent`, the deprecated US Privacy
37
43
  string, and GPP `gpp` and `gpp_sid`
38
- - Vendor parameter contracts for sixty endpoint families, each cited to the
39
- vendor's own documentation
44
+ - Vendor parameter contracts for sixty-three endpoint families, including Meta
45
+ Conversions API, TikTok Events API, Reddit CAPI, and the browser pixels
40
46
  - Endpoint attribution for 97 vendors, so an unrecognized pixel still gets a name.
41
47
 
42
48
  ## API
@@ -50,7 +56,7 @@ finding.targets[0]; // { component: "whole_url", start: 0, end: 46, ... }
50
56
  | `vendorForHost(host)` | The vendor that serves a host, or `null` |
51
57
  | `version()` | The `pixellint-core` version this build wraps |
52
58
 
53
- `options` takes `kind` (`url` by default, plus `vast`, `postback`, `request`,
59
+ `options` takes `kind` (`url` by default, plus `json`, `vast`, `postback`, `request`,
54
60
  `html`, `js`, `gtm`, `unknown`), `state` (`unknown`, `template`, `fired`), and
55
61
  `vendor` for a caller's claimed vendor.
56
62
 
@@ -60,6 +66,8 @@ stop being findings.
60
66
  ## Links
61
67
 
62
68
  - [Playground](https://pixellint.org)
69
+ - [Conversion API validator](https://pixellint.org/docs/conversion-api-validator/)
70
+ - [Pixel not firing](https://pixellint.org/docs/pixel-not-firing/)
63
71
  - [Rule inventory](https://github.com/aleksUIX/pixellint/blob/main/docs/STANDARDS.md)
64
72
  - [Writing a rulepack](https://github.com/aleksUIX/pixellint/blob/main/docs/RULEPACK_SCHEMA.md)
65
73
 
package/package.json CHANGED
@@ -1,23 +1,26 @@
1
1
  {
2
2
  "name": "pixellint",
3
- "version": "0.16.0",
4
- "description": "Validator for pixels, postbacks, conversion API payloads, and tracking URLs: spec-backed core rules, vendor rulepacks, and endpoint attribution",
3
+ "version": "0.17.1",
4
+ "description": "Validator for pixels, postbacks, conversion API payloads, and tracking URLs: Meta CAPI, Facebook pixel, GTM, and vendor rulepacks",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Aleks <aleks@vastlint.org>",
7
- "homepage": "https://github.com/aleksUIX/pixellint",
7
+ "homepage": "https://pixellint.org",
8
+ "bugs": "https://github.com/aleksUIX/pixellint/issues",
8
9
  "repository": {
9
10
  "type": "git",
10
11
  "url": "git+https://github.com/aleksUIX/pixellint.git"
11
12
  },
12
13
  "keywords": [
13
14
  "pixel",
14
- "adtech",
15
+ "conversion-api",
16
+ "capi",
17
+ "facebook-pixel",
18
+ "meta-pixel",
15
19
  "tracking",
16
20
  "validator",
17
- "linter",
18
- "consent",
19
- "gdpr",
20
- "wasm"
21
+ "adtech",
22
+ "gtm",
23
+ "linter"
21
24
  ],
22
25
  "main": "./index.cjs",
23
26
  "module": "./index.mjs",
Binary file