InteractiveAdvertisingBureau / Global-Privacy-Platform

IAB Tech Lab Global Privacy Platform specification
72 stars 36 forks source link

Mapping from section number to API prefix #72

Closed dgirardi closed 1 year ago

dgirardi commented 1 year ago

I can't find a way to go from section ID to section prefix (or vice-versa) using the CMP API; yet the CMP must have that information. For example, I can't say "getSection for each applicableSections ", unless I separately keep a map such as {"usnat": 7, ...} to tell which prefix to use.

Is that correct, or did I miss it?

If it is, could/should getSection be updated to also accept a section ID as an alternative to the prefix? Or PingReturn to include the section ID as part of its supportedAPIs?

patmmccann commented 1 year ago

maybe we could listen for sectionChange and never call getSection? image

https://github.com/InteractiveAdvertisingBureau/Global-Privacy-Platform/pull/71/files#r1176915477

dgirardi commented 1 year ago

That still doesn't provide the association; if I get a sectionChange for usnat I can't ask "is usnat applicable?" (unless, again, I separately maintain the same mapping that the CMP has).

patmmccann commented 1 year ago

if I get a sectionChange for usnat I can't ask "is usnat applicable?"

I don't think you need to, the event has all the paresed data attached assuming comments on #70 get included

Specifically item 3 here https://github.com/InteractiveAdvertisingBureau/Global-Privacy-Platform/pull/70#issuecomment-1591808950