forked from PubMatic-OpenWrap/prebid-openrtb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathuser.go
120 lines (106 loc) · 3.17 KB
/
user.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
package openrtb2
import "encoding/json"
// 3.2.20 Object: User
//
// This object contains information known or derived about the human user of the device (i.e., the audience for advertising).
// The user id is an exchange artifact and may be subject to rotation or other privacy policies.
// However, this user ID must be stable long enough to serve reasonably as the basis for frequency capping and retargeting.
type User struct {
// Attribute:
// id
// Type:
// string; recommended
// Description:
// Exchange-specific ID for the user. At least one of id or
// buyeruid is recommended.
ID string `json:"id,omitempty"`
// Attribute:
// buyeruid
// Type:
// string; recommended
// Description:
// Buyer-specific ID for the user as mapped by the exchange for
// the buyer. At least one of buyeruid or id is recommended.
BuyerUID string `json:"buyeruid,omitempty"`
// Attribute:
// yob
// Type:
// integer; DEPRECATED
// Description:
// Year of birth as a 4-digit integer.
Yob int64 `json:"yob,omitempty"`
// Attribute:
// gender
// Type:
// string; DEPRECATED
// Description:
// Gender, where “M” = male, “F” = female, “O” = known to be
// other (i.e., omitted is unknown).
Gender string `json:"gender,omitempty"`
// Attribute:
// keywords
// Type:
// string
// Description:
// Comma separated list of keywords, interests, or intent. Only
// one of ‘keywords’ or ‘kwarray’ may be present.
Keywords string `json:"keywords,omitempty"`
// Attribute:
// kwarray
// Type:
// string
// Description:
// Array of keywords about the site. Only one of ‘keywords’ or
// ‘kwarray’ may be present.
KwArray []string `json:"kwarray,omitempty"`
// Attribute:
// customdata
// Type:
// string
// Description:
// 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.
CustomData string `json:"customdata,omitempty"`
// Attribute:
// geo
// Type
// object
// Description:
// Location of the user’s home base defined by a Geo object
// (Section 3.2.19). This is not necessarily their current location.
Geo *Geo `json:"geo,omitempty"`
// Attribute:
// data
// Type:
// object array
// Description:
// Additional user data. Each Data object (Section 3.2.21)
// represents a different data source.
Data []Data `json:"data,omitempty"`
// Attribute:
// consent
// Type:
// string
// Description:
// When GDPR regulations are in effect this attribute contains
// the Transparency and Consent Framework’s Consent String
// data structure.
Consent string `json:"consent,omitempty"`
// Attribute:
// eids
// Type:
// object array
// Description:
// Details for support of a standard protocol for multiple third
// party identity providers (Section 3.2.27)
EIDs []EID `json:"eids,omitempty"`
// Attribute:
// ext
// Type:
// object
// Description:
// Placeholder for exchange-specific extensions to OpenRTB.
Ext json.RawMessage `json:"ext,omitempty"`
}