Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarification on getSection callback with GPP v1.1 #91

Open
tiberlas opened this issue Jul 14, 2023 · 3 comments
Open

Clarification on getSection callback with GPP v1.1 #91

tiberlas opened this issue Jul 14, 2023 · 3 comments

Comments

@tiberlas
Copy link

tiberlas commented Jul 14, 2023

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
Copy link
Contributor

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

@tiberlas
Copy link
Author

tiberlas commented Aug 2, 2023

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
Copy link

janwinkler commented Sep 14, 2023

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

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

No branches or pull requests

3 participants