Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prebid version in an HTTP header #1818

Closed
bretg opened this issue Apr 20, 2021 · 14 comments
Closed

Prebid version in an HTTP header #1818

bretg opened this issue Apr 20, 2021 · 14 comments
Labels
Intent to implement An issue describing a plan for a major feature. These are intended for community feedback PBS-Go

Comments

@bretg
Copy link
Contributor

bretg commented Apr 20, 2021

Type of issue

Proposed Enhancement

Description

The Prebid Server side of prebid/Prebid.js#6627

There's interest from some bidders to be able to cleanly distinguish the source of traffic. Currently it's up to each bidder to read the version and pass it to their endpoint. There aren't any conventions about where bidders should place this version, so they've probably done it in various ways.

The proposal is to update PBS to add/modify a new HTTP header x-prebid which carries the PBS version:

The Prebid.js team attempted to implement this header, but ran afoul of a browser CORS check -- it causes a pre-flight OPTIONS check, which is not acceptable. So instead, the proposal is to have the PrebidServer BidAdapter put the PBJS version in ext.prebid.channel: {name: "pbjs", version: "4.39"}.

This value should be made available to bid adapters who want to know the version of PBJS that initiated the request.

It's assumed that PBS can still add an HTTP header, but we should find a way to test this.

Prebid Server creates the header

Prebid Server creates the header, prepending the name and version from ext.prebid.channel.{name/version} if it exists:

x-prebid: pbjs/4.39,pbs-go/0.155
x-prebid: prebid-mobile/1.2.3,pbs-java/1.64

SDK

The SDK already sends the version in app.ext.prebid::

app.ext.prebid: {
   source:  "prebid-mobile"
   version: "1.2.3"
}

PBS should read app.ext.prebid and if present, add the source/version to outgoing HTTP headers.

@bszekely1
Copy link

Prebid SDK will be passing environment as well:
x-prebid: pbsdk-ios/1.12

@bretg bretg added Intent to implement An issue describing a plan for a major feature. These are intended for community feedback and removed enhancement labels Apr 30, 2021
@bretg
Copy link
Contributor Author

bretg commented May 5, 2021

Please hold off on this update -- it caused major problems in Prebid.js.

@bretg bretg added needs update and removed Intent to implement An issue describing a plan for a major feature. These are intended for community feedback labels May 5, 2021
@TheMediaGrid
Copy link
Contributor

Hi team,

I'd really love to make sure MediaGrid could support reading the PBS version. Any insights on the right param for us to be reading this from?

@bretg
Copy link
Contributor Author

bretg commented May 13, 2021

Updated the proposal to drop the header supplied by PBJS. Since it was a browser CORS thing that prevents the header, we believe it's still acceptable in server-to-server communication. Will discuss in the next committee meeting.

@bretg
Copy link
Contributor Author

bretg commented May 14, 2021

Discussed in committee. We need to consider the difference between the "integration" vs this ext.prebid.version proposal.

Also discussed whether we might need to make an opt-out on the new header. Looking for community input on this. Suggestion is to make it a global behavior flag initially until we learn whether we need a per-bidder flag.

@bretg
Copy link
Contributor Author

bretg commented May 14, 2021

Updated the proposal to not use ext.prebid.version, but rather ext.prebid.channel: {name: "pbjs", version: "4.39"}.

@bretg
Copy link
Contributor Author

bretg commented May 18, 2021

Updated the proposal to have PBS prepend ext.prebid.channel to x-prebid if it's specified.

@TheMediaGrid
Copy link
Contributor

@bretg does this mean that we would always get the PBS version in ext.prebid.channel if supported by the tech layer? (xandr, magnite, etc)

@spormeon
Copy link

no idea if this is any use to you but we change the global to "our" global, which then shows up, if your looking for pbjs and someone has changed it, your not going to find it?

DevTools_-cheftalk_com_ads_final-2

@bszekely1
Copy link

Prebid SDK already sends the version to PBS in the app.ext.prebid.version and the prebid source in app.ext.prebid.source:

	"app": {
		"bundle": "com.app",
		"name": "Prebid Demo",
		"publisher": {
			"id": "100"
		},
		"ext": {
			"prebid": {
				"source": "prebid-mobile",
				"version": "1.7"
			}
		}
	}

Rather than having to change the location of where Prebid SDK passes data, can we have PBS read the signal read from these existing locations?

@bretg bretg added Intent to implement An issue describing a plan for a major feature. These are intended for community feedback and removed needs update labels Jun 7, 2021
@bretg
Copy link
Contributor Author

bretg commented Jun 24, 2021

Released with PBS-Java 1.67

@rokostik
Copy link
Contributor

Hey everyone, I'm working on this issue in #1981 and would like your input on one case (raised in #1981 (review)):

If the binary doesn't have access to the version variable (if it's not built with the correct flag) I think it's best to note in the header that it came from pbs-go, so the version record would be pbs-go/unknown. Similarly for the channel and appExt, if the version is not given only the name or source is taken and the version is set to unknown. My reasoning is that it's still better to know the client type if the version is missing/unavailable. Any thoughts on this?

@bretg
Copy link
Contributor Author

bretg commented Aug 31, 2021

@rokostik - yes, the 'unknown' edge cases you mention are fine.

  • pbs-go/unknown
  • pbjs/unknown
  • prebid-mobile/unknown

@SyntaxNode
Copy link
Contributor

Implemented in PBS-Go 0.177.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Intent to implement An issue describing a plan for a major feature. These are intended for community feedback PBS-Go
Projects
None yet
Development

No branches or pull requests

6 participants