InteractiveAdvertisingBureau / Global-Privacy-Platform

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

Clarification on getSection callback with GPP v1.1 #91

Open tiberlas opened 1 year ago

tiberlas commented 1 year ago

Hi, it's unclear to me from the documentations for GPP v1.1 how the callback function for 'getSection' will look?

In my understanding for 'usnat' it will look like this:

__gpp('getSection',
  (data, success) => {
    /** data param example
    data = [
      {
        "Version": 1,
        "SharingNotice": 2,
        "SaleOptOutNotice": 1,
        "SharingOptOutNotice": 1,
        "TargetedAdvertisingOptOutNotice": 1,
        "SensitiveDataProcessingOptOutNotice": 1,
        "SensitiveDataLimitUseNotice": 0,
        "SaleOptOut": 2,
        "SharingOptOut": 2,
        "TargetedAdvertisingOptOut": 2,
        "SensitiveDataProcessing": [ … ],
        "KnownChildSensitiveDataConsents": [ … ],
        "PersonalDataConsents": 0,
        "MspaCoveredTransaction": 0,
        "MspaOptOutOptionMode": 0,
        "MspaServiceProviderMode": 0,
      }, {
        "GpcSegmentType": 1,
        "Gpc": false
      }
    ]
    */
  },
  "usnat");

Is this correct? Will the core consent always be the first element in the array?

One last unclearly is the success callback param.

patmmccann commented 1 year ago

Where did GpcSegmentType instead of SubsectionType that is in the usnat spec pop up?

tiberlas commented 1 year ago

Yes, you're right, it should be SubsectionType. The GpcSegmentType was in version 1.0.

And what about the object position in the array, will the GPC Sub-section always be on position?

janwinkler commented 11 months ago

Yes it looks good for me. "data" should be "an array of objects, where each object represents one sub-section". So for usnat it would be an array with one, maximal 2 objects in there, where the object consist of the fields given here: https://github.com/InteractiveAdvertisingBureau/Global-Privacy-Platform/blob/main/Sections/US-National/IAB%20Privacy%E2%80%99s%20National%20Privacy%20Technical%20Specification.md

so yes (besides the GpcSegmentType) it looks fine