Skip to content

Commit

Permalink
update openrtb fields to latest (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
danrthompson authored Jul 12, 2017
1 parent cc2f643 commit 48a534b
Show file tree
Hide file tree
Showing 3 changed files with 425 additions and 44 deletions.
55 changes: 45 additions & 10 deletions beeswax/openrtb/extension.proto
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ message Dimension {
optional int32 height = 2;
}

// Next available tag: 10
// Next available tag: 12
message BidRequestExtensions {
optional Enums.Inventory.Source inventory_source = 1;
optional base.EventId auction_id = 2;
Expand Down Expand Up @@ -76,6 +76,14 @@ message BidRequestExtensions {
// This field is used by Augmentors like ManagedListAugmentor
repeated AugmentorData augmentor_data = 6;

// Determines how impression notifications will happen for this request. See
// ImpressionTracker comments for more information.
optional Enums.Inventory.ImpressionTracker imp_tracker = 10;

// Determines how supplier click tracking will happen for this request. See
// SupplierClickTracker for more information.
optional Enums.Inventory.SupplierClickTracker supplier_click_tracker = 11;

// Exchange specific extensions
optional AppNexusBidRequestExtension appnexus = 7;
optional AdxBidRequestExtension adx = 9;
Expand Down Expand Up @@ -143,7 +151,7 @@ message BannerExtensions {
// Next available tag: 6
message VideoExtensions {
// player_size can be one of ["S", "M"., "L", "XL", "NA"].
// Computed by the LocalAugmentor in Stinger.
// Added by augmentor in Beeswax Front End Server (FES)
optional string player_size = 1;

// Creative attributes that are required by the request.
Expand Down Expand Up @@ -207,23 +215,38 @@ message ProducerExtensions {
extensions 1000 to max;
}

// Next available tag: 5
// Next available tag: 10
// Tag 1: idfa - Deprecated. Do not resuse.
message DeviceExtensions {
// Device screen size. Valid values are "S", "M", "L", "XL", and "NA"
// Computed by the LocalAugmentor in Stinger.
optional string device_screen_size = 2 [default = "NA"];
// Added by augmentor in Beeswax Front End Server (FES)
optional string augmented_device_screen_size = 2 [default = "NA"];

// Added by augmentor in Beeswax Front End Server (FES)
optional string augmented_browser = 3 [default = "-1"];

// Added by augmentor in Beeswax Front End Server (FES)
optional string augmented_browser_version = 4 [default = "-1"];

// Computed by the LocalAugmentor in Stinger.
optional string browser = 3 [default = "-1"];
// Added by augmentor in Beeswax Front End Server (FES)
optional string augmented_os = 5 [default = "-1"];

// Computed by the LocalAugmentor in Stinger.
optional string browser_version = 4 [default = "-1"];
// Added by augmentor in Beeswax Front End Server (FES)
optional string augmented_osv = 6 [default = "-1"];

// Added by augmentor in Beeswax Front End Server (FES)
optional string augmented_model = 7 [default = "-1"];

// Added by augmentor in Beeswax Front End Server (FES)
optional string augmented_make = 8 [default = "-1"];

// Added by augmentor in Beeswax Front End Server (FES)
optional Enums.BidRequest.Device.DeviceType augmented_devicetype = 9 [default = UNKNOWN];

extensions 1000 to max;
}

// Next available tag: 3
// Next available tag: 4
message UserExtensions {
// This field identifies the user of the bid request. It will be used
// for user segment lookup and frequency cap.
Expand All @@ -235,6 +258,9 @@ message UserExtensions {
// (Except bito_id - we still use bito as prefix)
optional string user_id = 1;
optional Enums.BidRequest.User.UserIdType user_id_type = 2;

// Number of days since the user cookie has been dropped, for example, 10
optional int32 cookie_age = 3;
extensions 1000 to max;
}

Expand Down Expand Up @@ -309,14 +335,23 @@ message ViewabilityExtensions {
// Exchange specific extensions.
// Next available tag: 3
message AdxBidRequestExtension {
// If true, then the selective callout model predicted that we will not bid
// on this request. ADX sends a sampled percentage of such requests so that they
// can automatically update the model when bidding patterns change.
optional bool is_predicted_to_be_ignored = 1;
// The offset of the user's time from GMT in minutes.
// For example, GMT-5 is timezone_offset = -300.
optional int32 timezone_offset = 2;
}

// Next available tag: 3
message AdxImpressionExtension {
optional int32 adslot_id = 1;
// Historical click-through rate for ads served in the ad slot. This is
// expressed as a fraction in the range [0.0, 1.0]. The default value of
// -1.0 indicates that historical click-through rate data is not available.
// This figure does not include data aggregated from AdWords.
optional float click_through_rate = 2 [default = -1.0];
}

message AdxGeoExtension {
Expand Down
115 changes: 81 additions & 34 deletions beeswax/openrtb/openrtb.proto
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import "beeswax/openrtb/openrtb_common.proto";
// OpenRTB extensions ("ext" fields in the spec & JSON representation)
// are represented here by Protocol Buffer extensions.

// Next available tag: 16 - Tag 19 is taken in order to match Google openrtb proto
/*
* OpenRTB 3.3.1: The top-level bid request object.
*/
Expand Down Expand Up @@ -101,10 +102,51 @@ message BidRequest {
* Container for any legal, governmental or industry regulations in force for the request.
*/
optional Regulations regs = 14;
/*
* A Source object (Section 3.2.2) that provides data about the
* inventory source and which entity makes the final decision.
*/
optional Source source = 19;

optional BidRequestExtensions ext = 1000;

// Next available tag: 14
// Next available tag: 4
/*
* OpenRTB 2.5: This object describes the nature and behavior of the entity
* that is the source of the bid request upstream from the exchange.
* The primary purpose of this object is to define post-auction or upstream
* decisioning when the exchange itself does not control the final decision.
* A common example of this is header bidding, but it can also apply to
* upstream server entities such as another RTB exchange, a mediation
* platform, or an ad server combines direct campaigns with 3rd party
* demand in decisioning.
*/
message Source {
/*
* Entity responsible for the final impression sale decision,
* where 0 = exchange, 1 = upstream source
* RECOMMENDED by the OpenRTB specification.
*/
optional bool fd = 1;
/*
* Transaction ID that must be common across all participants in
* this bid request (e.g., potentially multiple exchanges).
* RECOMMENDED by the OpenRTB specification.
*/
optional string tid = 2;
/*
* Payment ID chain string containing embedded syntax
* described in the TAG Payment ID Protocol v1.0.
* RECOMMENDED by the OpenRTB specification.
*/
optional string pchain = 3;
/*
* Extensions.
*/
extensions 100 to 9999;
}

// Next available tag: 15
/*
* OpenRTB 3.3.2: describes the ad position or impression being auctioned.
* A single bid request can include multiple “imp” objects, a use case for which might be an
Expand Down Expand Up @@ -180,6 +222,11 @@ message BidRequest {
* HTTP creatives.
*/
optional int32 secure = 12;
/*
* Advisory as to the number of seconds that may elapse
* between the auction and the actual impression.
*/
optional int32 exp = 14;

optional ImpressionExtensions ext = 1000;

Expand Down Expand Up @@ -264,6 +311,7 @@ message BidRequest {
optional BannerExtensions ext = 1000;
}

// Next available tag: 21 - Tags 26, 27 taken in order to match Google openrtb proto
/*
* OpenRTB 3.3.4: A video object typically describes an ad opportunity for in-stream video
* inventory (including linear pre-roll, mid-roll and post-roll, and non-linear overlays).
Expand Down Expand Up @@ -361,6 +409,14 @@ message BidRequest {
* Recommended if companion objects are included.
*/
repeated Enums.BidRequest.Impression.Video.CompanionType companiontype = 20;
/*
* Placement type for the impression.
*/
optional Enums.BidRequest.Impression.Video.VideoPlacementType placement = 26;
/*
* The event that causes playback to end.
*/
optional Enums.BidRequest.Impression.Video.PlaybackCessationMode playbackend = 27;

optional VideoExtensions ext = 1000;
}
Expand Down Expand Up @@ -695,7 +751,7 @@ message BidRequest {
optional ContentExtensions ext = 1000;
}

// Next available tag: 28
// Next available tag: 29 - Tag 30 taken in order to match Google openrtb proto
/*
* OpenRTB 3.3.10: Provides information pertaining to the device including its hardware,
* platform, location, and carrier. This device can refer to a mobile handset, a desktop
Expand Down Expand Up @@ -824,6 +880,14 @@ message BidRequest {
* MAC address of the device; hashed via MD5.
*/
optional string macmd5 = 28;
/*
* Mobile carrier as the concatenated MCC-MNC code (e.g.,
* "310-005" identifies Verizon Wireless CDMA in the USA).
* Refer to https://en.wikipedia.org/wiki/Mobile_country_code
* for further examples. Note that the dash between the MCC
* and MNC parts is required to remove parsing ambiguity.
*/
optional string mccmnc = 30;

optional DeviceExtensions ext = 1000;
}
Expand Down Expand Up @@ -1231,12 +1295,12 @@ message NativeRequest {
* The Layout ID of the native ad unit.
* This field is not required, but it's highly recommended.
*/
optional LayoutId layout = 2;
optional Enums.BidRequest.Impression.NativeRequest.LayoutId layout = 2;
/**
* The Ad unit ID of the native ad unit. This corresponds to one of IAB Core-6 native ad units.
* This field is not required, but it's highly recommended.
*/
optional AdUnitId adunit = 3;
optional Enums.BidRequest.Impression.NativeRequest.AdUnitId adunit = 3;
/**
* The number of identical placements in this Layout.
*/
Expand All @@ -1251,41 +1315,21 @@ message NativeRequest {
*/
repeated Asset assets = 6;
/**
* Extensions.
* The context in which the ad appears.
*/
extensions 100 to 9999;

optional Enums.BidRequest.Impression.NativeRequest.Context context = 7;
/**
* OpenRTB Native 7.1: Core layouts. An implementing exchange may not support all asset
* variants or introduce new ones unique to that system.
* A more detailed context in which the ad appears.
*/
enum LayoutId {
CONTENT_WALL = 1;
APP_WALL = 2;
NEWS_FEED = 3;
CHAT_LIST = 4;
CAROUSEL = 5;
CONTENT_STREAM = 6;
GRID = 7;
// Exchange-specific values above 500.
}

optional Enums.BidRequest.Impression.NativeRequest.ContextSubtype contextsubtype = 8;
/**
* OpenRTB Native 7.2: Below is a list of the core ad unit ids described by IAB here:
* http://www.iab.net/media/file/IABNativeAdvertisingPlaybook120413.pdf
* In feed unit is essentially a layout, it has been removed from the list.
* The in feed units can be identified via the layout parameter on the request.
* An implementing exchange may not support all asset variants or introduce new ones
* unique to that system.
* The design/format/layout of the ad unit being offered.
*/
enum AdUnitId {
PAID_SEARCH_UNIT = 1;
RECOMMENDATION_WIDGET = 2;
PROMOTED_LISTING = 3;
IAB_IN_AD_NATIVE = 4;
CUSTOM = 5;
// Exchange-specific values above 500.
}
optional Enums.BidRequest.Impression.NativeRequest.PlacementType plcmttype = 9;
/**
* Extensions.
*/
extensions 100 to 9999;

/**
* OpenRTB Native 4.2: The main container object for each asset requested or supported by
Expand Down Expand Up @@ -1460,6 +1504,9 @@ message NativeRequest {
/** Text describing a "call to action" button for the destination URL. */
CTATEXT = 12;
// Exchange-specific values above 500.

// STORE bit for ADX NativeAdTemplate
STORE = 500;
}
}
}
Expand Down
Loading

0 comments on commit 48a534b

Please sign in to comment.