Skip to content

Anonymised id system module - #15492

Merged
patmmccann merged 4 commits into
prebid:masterfrom
id-ward:ANON-8303-anonymised-id-system
Aug 17, 2026
Merged

Anonymised id system module#15492
patmmccann merged 4 commits into
prebid:masterfrom
id-ward:ANON-8303-anonymised-id-system

Conversation

@kyrylenko

@kyrylenko kyrylenko commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Type of change

  • Feature
  • Does this change affect user-facing APIs or examples documented on http://prebid.org?

Description of change

Adds anonymisedIdSystem, a User ID submodule that exposes the Anonymised user identifier to bid adapters as an OpenRTB Extended ID under the source anonymised.io.

The submodule makes no network request and loads no script. The Anonymised Marketing Tag, which the publisher already runs on the page, stores the identifier in localStorage under the key anon-cuid; getId reads that key through getStorageManager, validates it, and returns it. When the tag is absent or the user is not signed in there is no key, and no EID is added.

Anonymised already maintains anonymisedRtdProvider (same vendor, GVL ID 1116), which carries contextual segments. This submodule handles user identity only, in line with the separation the User ID and RTD frameworks draw.

Testing
npx gulp test --file test/spec/modules/anonymisedIdSystem_spec.js # 31 tests passing
npx eslint modules/anonymisedIdSystem.js modules/anonymisedIdSystem.d.ts
test/spec/modules/anonymisedIdSystem_spec.js # clean

Coverage spans every branch of getId and decode, the EID output shape via createEidsArray, and the warning behaviour.

Verified end-to-end on integrationExamples/gpt/hello_world.html with a build of userId,anonymisedIdSystem, and separately against a live auction, where the identifier appears in the outgoing bid request:

{ "eids": [ { "source": "anonymised.io", "uids": [{ "id": "01f6a483-86fa-406b-a7c2-45f6d4a89469", "atype": 1 }] } ] }

Other information

Documentation PR

Copilot AI lite review requested due to automatic review settings August 14, 2026 10:16
@github-actions

Copy link
Copy Markdown

Whoa there partner! This project is migrating to typescript. Consider changing the new JS files to TS, with well-defined types for what interacts with the prebid public API (for example: bid params and configuration). Thanks!

  • modules/anonymisedIdSystem.js

@github-actions

Copy link
Copy Markdown

This PR introduces changes that may not work on all browsers. According to Babel, the following polyfills may be needed, and they are not automatically included:

  • Changes to test/spec/modules/anonymisedIdSystem_spec.js may need:
    • es.json.stringify

The best way to address this is to provide good test coverage, as normal PR checks run unit tests on older browsers.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 10adcff0be

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

* IAB Global Vendor List ID
* @type {number}
*/
gvlid: GVLID,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Add the storage disclosure URL to the submodule

When the storageControl module is included, its default strict rule denies keyed storage reads unless module metadata has a disclosureURL with a matching disclosure; this submodule advertises the anon-cuid key through getStorageManager but never sets disclosureURL on the spec, so storage.getDataFromLocalStorage(STORAGE_KEY) is denied and the ID is never emitted for those publishers. Please expose the device-storage disclosure URL on the submodule object so metadata can authorize the read.

AGENTS.md reference: AGENTS.md:L75-L75

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

anonymisedIdSystem declares gvlid: 1116, and metadata/compileMetadata.mjs resolves the disclosure URL from the GVL when a module doesn't set one:

if (meta.disclosureURL == null && meta.gvlid != null) {
  meta.disclosureURL = await getDisclosureUrl(meta.gvlid);
}

Vendor 1116 has deviceStorageDisclosureUrl registered as https://cdn1.anonymised.io/deviceStorage.json, which declares anon-cuid (type: "web", domains: ["*"]) — so storageControl matches it and the read is allowed. The disclosureURL property is an override for vendors without a GVL-registered URL (adplusIdSystem, jixieIdSystem); setting it here would take precedence over the GVL lookup and pin a URL the GVL is authoritative for. anonymisedRtdProvider already works this way — gvlid only.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@codex op is correct, the URL is only useful in absence of a gvlid, the build process accesses the URL in the gvl

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary

  • Documented that disclosureURL is intentionally omitted because metadata compilation resolves the authoritative device-storage disclosure through GVL vendor ID 1116. modules/anonymisedIdSystem.jsL80-L85
  • Committed the change as 35b4163 (Clarify Anonymised ID disclosure resolution).
  • The repository has no configured Git remote, and the required make_pr tool is unavailable in this environment, so a pull request could not be created.

Testing

  • npx eslint modules/anonymisedIdSystem.js --cache --cache-strategy content
  • npx gulp test --nolint --file test/spec/modules/anonymisedIdSystem_spec.js (35 tests completed in both feature configurations)
  • git diff --check
  • git status --short --branch (clean working tree)

View task →

Comment thread modules/anonymisedIdSystem.js Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new User ID submodule (anonymisedIdSystem) to expose an Anonymised Marketing Tag identifier as an OpenRTB Extended ID (EID) with source anonymised.io, including docs, typings, and unit tests.

Changes:

  • Introduces modules/anonymisedIdSystem.js userId submodule that reads localStorage["anon-cuid"], validates it, and emits an EID mapping for anonymised.io.
  • Adds TypeScript augmentation for the userId spec and comprehensive unit tests for validation/decoding/EID output.
  • Updates userId documentation and registers the submodule in modules/.submodules.json.

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
test/spec/modules/anonymisedIdSystem_spec.js Adds unit coverage for getId/decode validation and EID output.
modules/userId/userId.md Documents how to configure the new anonymisedId submodule (without storage).
modules/userId/eids.md Adds anonymised.io example entry to the generated EIDs documentation.
modules/anonymisedIdSystem.md Adds module documentation (usage, constraints, and disclosure notes).
modules/anonymisedIdSystem.js Implements the new User ID submodule and EID mapping.
modules/anonymisedIdSystem.d.ts Adds userId spec TypeScript augmentation for anonymisedId.
modules/.submodules.json Registers anonymisedIdSystem as a known submodule.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread modules/anonymisedIdSystem.js
@kyrylenko kyrylenko changed the title Anon 8303 anonymised id system Anonymised id system module Aug 14, 2026
@barecheck

barecheck Bot commented Aug 14, 2026

Copy link
Copy Markdown

Barecheck - Code coverage report

Total: 91.2%

Your code coverage diff: 0.01% ▴

✅ All code changes are covered

@patmmccann
patmmccann merged commit 8f1fbbc into prebid:master Aug 17, 2026
99 checks passed
@patmmccann patmmccann added feature and removed core labels Aug 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants