Skip to content

DOC: Bring the PMP page up to date with the service - #241

Open
jwrosewell wants to merge 1 commit into
mainfrom
fix/pmp-docs-current-service
Open

jwrosewell wants to merge 1 commit into
mainfrom
fix/pmp-docs-current-service

Conversation

@jwrosewell

@jwrosewell jwrosewell commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

The two faults reported

Both were found working on the 51Degrees website against cloud release
4.4.38.

The script tag on the PMP page does not work. The page showed

https://cloud.51degrees.com/api/v4/pmp?resource=YOUR-RESOURCE-KEY

and that address answers 404, so anyone copying the tag off the page
fetched nothing and saw no dialog. The resource key goes in the path now,
which is the shape every other keyed request takes:

https://cloud.51degrees.com/api/v4/pmp/YOUR-RESOURCE-KEY.js

data-resource-key on the tag is not read either, so the key has one home
and a page cannot carry one the cloud never sees.

The alternative button does not store standard. It stores
non-marketing, which is the visitor declining marketing. The change was
made so that a publisher reading an answer shared from another site can
tell a visitor who declined from one who accepted the lesser of the two
kinds. The page still said standard, and it also said that visitors
taking that path avoid personalized advertising but are still covered by
standard marketing tracking, which is the opposite of what happens now.

What else on the page was out of date

Having found two, I checked the rest of the page against the service
rather than fixing only the two, and rewrote the page where it no longer
matched:

  • The endpoints. A page view now makes two requests, the loader and
    the bundle the loader decides is needed. The page described one. Which
    of the two is checked and counted is worth knowing, as is the fact that
    the resource key has to be registered for the domain the page is on and
    a page suppressing the Referer header is refused.
  • Where the language comes from. The page said the locale is picked
    from an accept-language query parameter or the Accept-Language
    header. The loader picks it from the visitor's own browser.
  • The 51Degrees client script. It was not mentioned at all, and PMP
    reads two things from it, being whether third party cookies work in
    this browser and whether the General Data Protection Regulation
    applies. The page now says to put it on the page, that either order
    works with async on both, and what PMP does where no object appears.
  • The configuration table. It claimed to be the full set and was
    missing data-license-key, data-network-name, data-network-logo,
    data-use-third-party-cookies and data-object-name. It also marked
    data-action-url as required, which it is not. data-timeout is no
    longer read and a page that still sets it gets a console warning, so
    that is now said too.
  • What the action URL is for. The page had it as the continuation
    that fetches the 51Did, with the client script address and
    id.usage={preference} on it. That loaded the client script again on
    every answer. The client script hears the answer on the window and
    sends it as id.usage itself, so the action URL is a hook for a
    publisher's own code, and one naming the cloud is skipped with a
    console message.
  • The id.usage mapping. non-marketing was missing from the table
    of three values. What a resource key without the 51Did product does and
    does not still do is now said, since the question is asked either way
    and only the answer's result changes.
  • Sharing an answer across sites. The second card was not described
    at all, nor the three things that have to hold before it is offered.
  • The dialog. The first card has no close cross, and after an answer
    it collapses to a bubble that reopens it, which is how a visitor
    changes an answer without clearing storage. The page only described
    clearing the localStorage key.
  • The browser requirement. ES2020, which matters most for
    televisions, set-top boxes and games consoles.

The localStorage key and shape are unchanged, apart from p now
carrying one of three values rather than two.

Two other pages carried the same faults

  • src/identifiers/overview.md expanded PMP as "Privacy Marketing
    Preference". It is the Preference Management Platform. The same line
    listed two preference values where there are three.
  • src/identifiers/fodid.md said PMP "fires the request with id.usage
    already set". PMP announces the answer on the page and the 51Degrees
    client script hears it and sends it.

Checked and not changed

  • src/devicedetection/otherintegrations/wordpress.md describes the
    WordPress plugin's PMP tab and says the choice needs "no cookies and no
    extra server round-trips". Whether that still holds depends on how the
    plugin configures the tag, which is not something this repository can
    answer, so I have left it and raised it separately.
  • The purposes PMP encodes into its TCF consent string and the purposes
    the cloud requires when it derives id.usage from a TCF string are not
    the same sets. The derivation is only used by callers who hand the
    cloud a raw string, and PMP sends id.usage directly, so nothing on
    these pages is wrong because of it. I have left the two alone rather
    than writing a reconciliation I cannot stand behind, and it is worth
    someone who owns both checking.

Evidence

Every statement added or changed was checked against the service's own
source and its tests, not against prose about it. The 404 on the old
address is pinned by an integration test gated to release 4.4.38.

This repository's .utm-lint.json is { "mode": "forbid" }, so no
campaign tags were added to any link. scripts/utm-lint.ps1 from
common-ci run against the working tree reports UTM link lint: clean.

The Preview Documentation workflow does run on a pull request, and it ran
on this branch's current head, d26e57e, run
35169124239
,
and succeeded. Its log shows src/identifiers/pmp.md,
src/identifiers/overview.md and src/identifiers/fodid.md all read and
Generating docs for page Identifiers_PMP, so the three changed pages were
rendered. The warnings in that log are the Doxyfile and tag file ones the
build already carried. The UTM link lint passed as well, run
35169124212
.
The markup uses only @page and @ref, which the page already used, and
every @ref target on it resolves to a page in this repository.

main here requires one approving review, so nothing merges this on its
own and a person has to approve it first.

The PMP page still showed the script tag with the resource key as a query
parameter. That address answers 404 now, so a page copied from this page
fetched nothing and showed no dialog. The key goes in the path instead,
`https://cloud.51degrees.com/api/v4/pmp/YOUR-RESOURCE-KEY.js`, and
`data-resource-key` on the tag is not read.

The page also said the alternative button stores `standard`. It stores
`non-marketing`, which is the visitor declining marketing, so that a
publisher reading an answer shared from another site can tell a visitor
who declined from one who accepted the lesser of the two kinds.

Everything else on the page was checked against the service and brought
up to date at the same time:

- the two endpoints, the loader and the bundle it fetches, with the
  domain check and which of the two is counted;
- the language being chosen in the browser rather than from a request
  header;
- the 51Degrees client script belonging on the page as well, where the
  third party cookie result and the GDPR answer are read from;
- the configuration table, which had five attributes missing and marked
  `data-action-url` as required when it is not, and `data-timeout`,
  which is no longer read;
- the action URL being a hook of the publisher's own rather than the
  route the answer takes to the cloud, since the client script hears the
  answer on the window and sends it as `id.usage` itself;
- `non-marketing` added to the `id.usage` mapping, with what a resource
  key without the 51Did product does and does not still do;
- the second card that shares an answer across a group of sites, and the
  three things that have to hold before it is offered;
- the dialog collapsing to a bubble, and the bubble being the way to
  change an answer without clearing storage;
- the ES2020 requirement.

Two other pages carried the same faults. The identifiers overview
expanded PMP as "Privacy Marketing Preference" and listed two preference
values, and the 51Did page said PMP fires the request itself.

The UTM link lint passes, and this repository forbids campaign tags, so
none were added.
@github-actions

Copy link
Copy Markdown
Contributor

Documentation preview 👀

@jwrosewell
jwrosewell marked this pull request as ready for review September 17, 2026 20:07
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