Skip to content

Emit Content Taxonomy 3.1 IDs with cattax 9, and ship the full catalog in the JS package - #1

Open
esteininger wants to merge 1 commit into
IABTechLab:mainfrom
esteininger:fix/cattax-9-and-full-js-catalog
Open

esteininger wants to merge 1 commit into
IABTechLab:mainfrom
esteininger:fix/cattax-9-and-full-js-catalog

Conversation

@esteininger

@esteininger esteininger commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

This fixes two bugs in what the mapper emits, and prepares 1.1.0.

  • Default cattax changes from 2 to 9. In AdCOM's List: Category Taxonomies, 2 is Content Taxonomy 2.0 and 9 is 3.1, and the bundled catalog is 3.1. With the old default, every output told receivers to read 3.x IDs as 2.0 codes. Every 3.0 ID is also a 3.1 ID, so callers that need 3.0 can pass cattax: 7 and get the same output.
  • The JavaScript package now ships the same catalogs as the Python package: Content Taxonomy 3.1 (704 categories) and 2.2 (1,197). Before this, javascript/data/iab_3x.json held a 6-row sample whose IDs (for example 3-5-2 for Cooking, which is 216 in the official file) do not exist in Content Taxonomy 3.1.
  • synonyms_3x.json is keyed by label, which is how both mappers look synonyms up. The path-keyed entries never matched, and "Team Sports" is not a 3.1 label.
  • A record with a 2.x code and no label now maps, by looking the label up in the bundled 2.x catalog. Before, {"code": "1"} returned no IDs.
  • README examples use real 3.1 IDs. Version is 1.1.0 in both packages, with a dated CHANGELOG entry.

Tests: Python 9 passed, with the same 5 failures as main (checked on 13cddec). JavaScript 49 of 50, with the same unicode-normalization failure as main.

Most of the cli.py diff is formatting (black and isort), because the copy this came from is formatted that way; its behavior change is the one-line cattax default.

…g in the JS package

- Default cattax 2 -> 9 (AdCOM: 2 is Content Taxonomy 2.0, 9 is 3.1).
- JS package ships the 3.1 (704) and 2.2 catalogs the Python package has.
- synonyms_3x.json keyed by label, as both mappers look it up.
- A 2.x code with no label maps through the 2.x catalog.
- Version 1.1.0.
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