Skip to content

Commit e42c27d

Browse files
authored
Merge pull request #7 from UnityTech/APIN-1583
[APIN-1583] Add consent field in openRTB user extension
2 parents db62871 + 9cbc1f9 commit e42c27d

1 file changed

Lines changed: 15 additions & 10 deletions

File tree

openrtb.go

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -242,16 +242,16 @@ type Geo struct {
242242
// privacy policies. However, this user ID must be stable long enough to serve reasonably as the basis for
243243
// frequency capping and retargeting.
244244
type User struct {
245-
ID string `json:"id,omitempty"` // Unique consumer ID of this user on the exchange
246-
BuyerID string `json:"buyerid,omitempty"` // Buyer-specific ID for the user as mapped by the exchange for the buyer. At least one of buyeruid/buyerid or id is recommended. Valid for OpenRTB 2.3.
247-
BuyerUID string `json:"buyeruid,omitempty"` // Buyer-specific ID for the user as mapped by the exchange for the buyer. Same as BuyerID but valid for OpenRTB 2.2.
248-
YOB int `json:"yob,omitempty"` // Year of birth as a 4-digit integer.
249-
Gender string `json:"gender,omitempty"` // Gender ("M": male, "F" female, "O" Other)
250-
Keywords string `json:"keywords,omitempty"` // Comma separated list of keywords, interests, or intent
251-
CustomData string `json:"customdata,omitempty"` // Optional feature to pass bidder data that was set in the exchange's cookie. The string must be in base85 cookie safe characters and be in any format. Proper JSON encoding must be used to include "escaped" quotation marks.
252-
Geo *Geo `json:"geo,omitempty"`
253-
Data []Data `json:"data,omitempty"`
254-
Ext Extension `json:"ext,omitempty"`
245+
ID string `json:"id,omitempty"` // Unique consumer ID of this user on the exchange
246+
BuyerID string `json:"buyerid,omitempty"` // Buyer-specific ID for the user as mapped by the exchange for the buyer. At least one of buyeruid/buyerid or id is recommended. Valid for OpenRTB 2.3.
247+
BuyerUID string `json:"buyeruid,omitempty"` // Buyer-specific ID for the user as mapped by the exchange for the buyer. Same as BuyerID but valid for OpenRTB 2.2.
248+
YOB int `json:"yob,omitempty"` // Year of birth as a 4-digit integer.
249+
Gender string `json:"gender,omitempty"` // Gender ("M": male, "F" female, "O" Other)
250+
Keywords string `json:"keywords,omitempty"` // Comma separated list of keywords, interests, or intent
251+
CustomData string `json:"customdata,omitempty"` // Optional feature to pass bidder data that was set in the exchange's cookie. The string must be in base85 cookie safe characters and be in any format. Proper JSON encoding must be used to include "escaped" quotation marks.
252+
Geo *Geo `json:"geo,omitempty"`
253+
Data []Data `json:"data,omitempty"`
254+
Ext UserExtension `json:"ext,omitempty"`
255255
}
256256

257257
// The data and segment objects together allow additional data about the user to be specified. This data
@@ -295,3 +295,8 @@ type Format struct {
295295
type RegExtension struct {
296296
GDPR int `json:"gdpr,omitempty"`
297297
}
298+
299+
// UserExtension Extension object for User
300+
type UserExtension struct {
301+
Consent int `json:"consent,omitempty"`
302+
}

0 commit comments

Comments
 (0)