From 01b17c4858e03e94297e8661e3d4024b0be83af7 Mon Sep 17 00:00:00 2001 From: Ian Meyers Date: Wed, 9 Feb 2022 10:51:38 -0800 Subject: [PATCH 1/2] add docs on consent metadata --- .../getConsentMetadata.md | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 dev-docs/publisher-api-reference/getConsentMetadata.md diff --git a/dev-docs/publisher-api-reference/getConsentMetadata.md b/dev-docs/publisher-api-reference/getConsentMetadata.md new file mode 100644 index 0000000000..027f217c00 --- /dev/null +++ b/dev-docs/publisher-api-reference/getConsentMetadata.md @@ -0,0 +1,25 @@ +--- +layout: api_prebidjs +title: pbjs.getConsentMetadata() +description: +--- + + +The `getConsentMetadata()` function will return basic information about the status of supported (and configured!) consent content within Prebid. + +``` +pbjs.getConsentMetadata() // returns e.g. +{ + "coppa": false, + "gdpr": { + "apiVersion": 2, + "consentStringExists": true, + "gdprApplies": true, + "timestamp": 1644358143306 + }, + "usp": { + "timestamp": 1644358143306, + "usp": "1YYY" + } +} +``` \ No newline at end of file From 6983f983ab4572fb0c1e67004c49148c97a47afb Mon Sep 17 00:00:00 2001 From: Ian Meyers Date: Thu, 17 Feb 2022 10:03:40 -0800 Subject: [PATCH 2/2] updating for code changes in #8043 --- dev-docs/publisher-api-reference/getConsentMetadata.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dev-docs/publisher-api-reference/getConsentMetadata.md b/dev-docs/publisher-api-reference/getConsentMetadata.md index 027f217c00..abdae9bd1a 100644 --- a/dev-docs/publisher-api-reference/getConsentMetadata.md +++ b/dev-docs/publisher-api-reference/getConsentMetadata.md @@ -13,12 +13,12 @@ pbjs.getConsentMetadata() // returns e.g. "coppa": false, "gdpr": { "apiVersion": 2, - "consentStringExists": true, + "consentStringSize": 100, "gdprApplies": true, - "timestamp": 1644358143306 + "generatedAt": 1644358143306 }, "usp": { - "timestamp": 1644358143306, + "generatedAt": 1644358143306, "usp": "1YYY" } }