From 36e5ae8ae4e4293b085d5d6db2527d897f40cd26 Mon Sep 17 00:00:00 2001 From: Scott Kay Date: Wed, 20 Nov 2024 18:40:49 -0500 Subject: [PATCH 1/3] OpenRTB 2.6-202409 --- openrtb2/device.go | 4 ++++ openrtb2/eid.go | 44 ++++++++++++++++++++++++++++++++++++++++++-- openrtb2/user.go | 12 ++++++++---- 3 files changed, 54 insertions(+), 6 deletions(-) diff --git a/openrtb2/device.go b/openrtb2/device.go index 90e84fa..6f88d1e 100644 --- a/openrtb2/device.go +++ b/openrtb2/device.go @@ -266,6 +266,10 @@ type Device struct { // string // Description: // ID sanctioned for advertiser use in the clear (i.e., not hashed). + // Unless prior arrangements have been made between the buyer and the + // seller directly, the value in this field is expected to be an ID + // derived from a call to an advertising API provided by the device’s + // Operating System. IFA string `json:"ifa,omitempty"` // Attribute: diff --git a/openrtb2/eid.go b/openrtb2/eid.go index b05945e..74d5bb1 100644 --- a/openrtb2/eid.go +++ b/openrtb2/eid.go @@ -9,13 +9,53 @@ import "encoding/json" // The exchange should ensure that business agreements allow for the sending of this data. type EID struct { + // Attribute: + // inserter + // Type: + // string + // Description: + // The canonical domain name of the entity (publisher, publisher monetization + // company, SSP, Exchange, Header Wrapper, etc.) that caused the ID array element + // to be added. This may be the operational domain of the system, if that is + // different from the parent corporate domain, to facilitate WHOIS and reverse IP + // lookups to establish clear ownership of the delegate system. + // + // This should be the same value as used to identify sellers in an ads.txt file if + // one exists. + // + // For ad tech intermediaries, this would be the domain as used in ads.txt. For + // publishers, this would match the domain in the `site` or `app` object. + Inserter string `json:"inserter,omitempty"` + + // Attribute: + // matcher + // Type: + // string + // Description: + // Technology providing the match method as defined in mm. + // + // In some cases, this may be the same value as inserter. + // + // When blank, it is assumed that the matcher is equal to the source + // + // May be omitted when mm=0, 1, or 2. + Matcher string `json:"matcher,omitempty"` + + // Attribute: + // mm + // Type: + // integer + // Description: + // Match method used by the matcher. Refer to List: Delivery Methods + // in AdCOM 1.0. + MM int64 `json:"mm,omitempty"` + // Attribute: // source // Type: // string // Description: - // Source or technology provider responsible for the set of - // included IDs. Expressed as a top-level domain. + // Canonical domain of the ID. Source string `json:"source,omitempty"` // Attribute: diff --git a/openrtb2/user.go b/openrtb2/user.go index a96702d..cf97222 100644 --- a/openrtb2/user.go +++ b/openrtb2/user.go @@ -14,8 +14,10 @@ type User struct { // Type: // string; recommended // Description: - // Exchange-specific ID for the user. At least one of id or - // buyeruid is recommended. + // Exchange-specific ID for the user. At least one of id or buyeruid is + // recommended. Unless prior arrangements have been made between the buyer + // and the seller directly, the value in this field is expected to be derived + // from an ID sync. See Appendix C (Cookie Based ID Syncing). ID string `json:"id,omitempty"` // Attribute: @@ -23,8 +25,10 @@ type User struct { // 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. + // Buyer-specific ID for the user as mapped by the exchange for the buyer. + // Unless prior arrangements have been made between the buyer and the seller + // directly, the value in this field is expected to be derived from an ID sync. + // See Appendix C (Cookie Based ID Syncing). BuyerUID string `json:"buyeruid,omitempty"` // Attribute: From 12a19747aba2b99023cb686217b956b46af42ddc Mon Sep 17 00:00:00 2001 From: Scott Kay Date: Wed, 20 Nov 2024 18:46:57 -0500 Subject: [PATCH 2/3] AdCom v1.0-202409 --- adcom1/match_method.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 adcom1/match_method.go diff --git a/adcom1/match_method.go b/adcom1/match_method.go new file mode 100644 index 0000000..2f156cd --- /dev/null +++ b/adcom1/match_method.go @@ -0,0 +1,15 @@ +package adcom1 + +// MatchMethod represents various ways an ID could be matched to an ad request, and if they pertain to a single property or app. +// It should be used on conjunction with the mm attribute in Object: EID of OpenRTB 2.x. +type MatchMethod int64 + +// Various ways an ID could be matched to an ad request +const ( + MatchMethodUnknown MatchMethod = 0 + 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). + MatchMethodBrowserCookieSync MatchMethod = 2 // Real time cookie sync as described in Appendix C (Cookie Based ID Syncing) of OpenRTB 2.x. + MatchMethodAuthenticated MatchMethod = 3 // ID match was based on user authentication such as an email login or hashed PII. + 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). + 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). +) From 808dd71fab142410f4fd93414603268660b54bb7 Mon Sep 17 00:00:00 2001 From: Scott Kay Date: Wed, 11 Dec 2024 00:34:36 -0500 Subject: [PATCH 3/3] review feedback --- openrtb2/eid.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/openrtb2/eid.go b/openrtb2/eid.go index 74d5bb1..d5fba46 100644 --- a/openrtb2/eid.go +++ b/openrtb2/eid.go @@ -1,6 +1,10 @@ package openrtb2 -import "encoding/json" +import ( + "encoding/json" + + "github.com/prebid/openrtb/v20/adcom1" +) // 3.2.27 Object: EID // @@ -46,9 +50,9 @@ type EID struct { // Type: // integer // Description: - // Match method used by the matcher. Refer to List: Delivery Methods + // Match method used by the matcher. Refer to List: ID Match Methods // in AdCOM 1.0. - MM int64 `json:"mm,omitempty"` + MM adcom1.MatchMethod `json:"mm,omitempty"` // Attribute: // source