Skip to content

Commit bb6e1c5

Browse files
authored
OpenRTB 2.6-202409 + AdCom v1.0-202409 (#16)
1 parent 1845ce2 commit bb6e1c5

4 files changed

Lines changed: 74 additions & 7 deletions

File tree

adcom1/match_method.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
package adcom1
2+
3+
// MatchMethod represents various ways an ID could be matched to an ad request, and if they pertain to a single property or app.
4+
// It should be used on conjunction with the mm attribute in Object: EID of OpenRTB 2.x.
5+
type MatchMethod int64
6+
7+
// Various ways an ID could be matched to an ad request
8+
const (
9+
MatchMethodUnknown MatchMethod = 0
10+
MatchMethodNoMatch MatchMethod = 1 // No matching has occurred. The associated ID came directly from a 3rd-party cookie or OS-provided resettable device ID for advertising (IFA).
11+
MatchMethodBrowserCookieSync MatchMethod = 2 // Real time cookie sync as described in Appendix C (Cookie Based ID Syncing) of OpenRTB 2.x.
12+
MatchMethodAuthenticated MatchMethod = 3 // ID match was based on user authentication such as an email login or hashed PII.
13+
MatchMethodObserved MatchMethod = 4 // ID match was based on a 1st party observation, but without user authentication (e.g. GUID, SharedID, Session IDs, CHIPS or other 1st party cookies contained in localStorage).
14+
MatchMethodInference MatchMethod = 5 // ID match was inferred from linkage based on non-authenticated features across multiple browsers or devices (e.g. IP address and/or UserAgent).
15+
)

openrtb2/device.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,10 @@ type Device struct {
266266
// string
267267
// Description:
268268
// ID sanctioned for advertiser use in the clear (i.e., not hashed).
269+
// Unless prior arrangements have been made between the buyer and the
270+
// seller directly, the value in this field is expected to be an ID
271+
// derived from a call to an advertising API provided by the device’s
272+
// Operating System.
269273
IFA string `json:"ifa,omitempty"`
270274

271275
// Attribute:

openrtb2/eid.go

Lines changed: 47 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
package openrtb2
22

3-
import "encoding/json"
3+
import (
4+
"encoding/json"
5+
6+
"github.com/prebid/openrtb/v20/adcom1"
7+
)
48

59
// 3.2.27 Object: EID
610
//
@@ -9,13 +13,53 @@ import "encoding/json"
913
// The exchange should ensure that business agreements allow for the sending of this data.
1014
type EID struct {
1115

16+
// Attribute:
17+
// inserter
18+
// Type:
19+
// string
20+
// Description:
21+
// The canonical domain name of the entity (publisher, publisher monetization
22+
// company, SSP, Exchange, Header Wrapper, etc.) that caused the ID array element
23+
// to be added. This may be the operational domain of the system, if that is
24+
// different from the parent corporate domain, to facilitate WHOIS and reverse IP
25+
// lookups to establish clear ownership of the delegate system.
26+
//
27+
// This should be the same value as used to identify sellers in an ads.txt file if
28+
// one exists.
29+
//
30+
// For ad tech intermediaries, this would be the domain as used in ads.txt. For
31+
// publishers, this would match the domain in the `site` or `app` object.
32+
Inserter string `json:"inserter,omitempty"`
33+
34+
// Attribute:
35+
// matcher
36+
// Type:
37+
// string
38+
// Description:
39+
// Technology providing the match method as defined in mm.
40+
//
41+
// In some cases, this may be the same value as inserter.
42+
//
43+
// When blank, it is assumed that the matcher is equal to the source
44+
//
45+
// May be omitted when mm=0, 1, or 2.
46+
Matcher string `json:"matcher,omitempty"`
47+
48+
// Attribute:
49+
// mm
50+
// Type:
51+
// integer
52+
// Description:
53+
// Match method used by the matcher. Refer to List: ID Match Methods
54+
// in AdCOM 1.0.
55+
MM adcom1.MatchMethod `json:"mm,omitempty"`
56+
1257
// Attribute:
1358
// source
1459
// Type:
1560
// string
1661
// Description:
17-
// Source or technology provider responsible for the set of
18-
// included IDs. Expressed as a top-level domain.
62+
// Canonical domain of the ID.
1963
Source string `json:"source,omitempty"`
2064

2165
// Attribute:

openrtb2/user.go

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,21 @@ type User struct {
1414
// Type:
1515
// string; recommended
1616
// Description:
17-
// Exchange-specific ID for the user. At least one of id or
18-
// buyeruid is recommended.
17+
// Exchange-specific ID for the user. At least one of id or buyeruid is
18+
// recommended. Unless prior arrangements have been made between the buyer
19+
// and the seller directly, the value in this field is expected to be derived
20+
// from an ID sync. See Appendix C (Cookie Based ID Syncing).
1921
ID string `json:"id,omitempty"`
2022

2123
// Attribute:
2224
// buyeruid
2325
// Type:
2426
// string; recommended
2527
// Description:
26-
// Buyer-specific ID for the user as mapped by the exchange for
27-
// the buyer. At least one of buyeruid or id is recommended.
28+
// Buyer-specific ID for the user as mapped by the exchange for the buyer.
29+
// Unless prior arrangements have been made between the buyer and the seller
30+
// directly, the value in this field is expected to be derived from an ID sync.
31+
// See Appendix C (Cookie Based ID Syncing).
2832
BuyerUID string `json:"buyeruid,omitempty"`
2933

3034
// Attribute:

0 commit comments

Comments
 (0)