-
Notifications
You must be signed in to change notification settings - Fork 772
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
Sharethrough: Add support for GPID #1925
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,18 @@ | ||
package openrtb_ext | ||
|
||
type ExtImpSharethrough struct { | ||
Pkey string `json:"pkey"` | ||
Iframe bool `json:"iframe"` | ||
IframeSize []int `json:"iframeSize"` | ||
BidFloor float64 `json:"bidfloor"` | ||
type ExtData struct { | ||
PBAdSlot string `json:"pbadslot"` | ||
} | ||
|
||
// ExtImpSharethrough defines the contract for bidrequest.imp[i].ext.sharethrough | ||
type ExtImpSharethrough struct { | ||
Pkey string `json:"pkey"` | ||
Iframe bool `json:"iframe"` | ||
IframeSize []int `json:"iframeSize"` | ||
BidFloor float64 `json:"bidfloor"` | ||
Data *ExtData `json:"data,omitempty"` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You defined a new bidder parameter. Can you please update There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @VeronikaSolovei9 do we have to? None of the other adapters which implement some sort of There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You don't have to but it is definitely preferred/recommended. You'll get parameter validation by PBS core upstream so you can be sure you have valid data in your ext when your adapter code executes. Bidder param documentation can be found here: https://docs.prebid.org/prebid-server/developers/add-new-bidder-go.html#bidder-parameters There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @epechuzal I discussed this with the team and this is actually required because other systems and front-ends may use the defined schema. |
||
} | ||
|
||
type ExtImpSharethroughResponse struct { | ||
AdServerRequestID string `json:"adserverRequestId"` | ||
BidID string `json:"bidId"` | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just checking, do you need
ExtData
or could you remove it and just havePBAdSlot
inExtImpSharethrough
with anomitempty
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bsardo I am not sure. I am trying to get the GPID found in
imp[].ext.data
, similar to #1807.In pbjs the method to implement was to extract the
ortb2Imp.ext.data.pbadslot
value. I am looking for the equivalent for prebid-server. As far as I can tell from checking PRs from other adapters they all implement it this way, but I was unable to find any official documentation that says exactly how this should be done.Can you help? I see that you approved the PR from
TheMediaGrid
which does the same thing, is there something that our implementation is missing?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure I can help. I did some digging and I now believe your implementation is correct
assuming the GPID, which I'm guessing stands for global placement ID, is considered ad-specific first party data.The documentation here indicates that all PBS request ad-specific first party data belongs at
imp[].ext.data
:https://docs.prebid.org/prebid-server/endpoints/openrtb2/pbs-endpoint-auction.html#prebid-server-ortb2-extension-summary
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@epechuzal, sorry I got confused above, hence the strikethrough. I still believe your implementation is correct but I wasn't clear why. Let me back up.
You're expecting
PbAdslot
andAdServer
atimp[].ext.data
in the PBS inbound request and you're puttingGPID
in the query string of the PBS outbound request to your server.For inbound request data, if it is ad-specific first party data, it belongs at
imp[]ext.data
according to the referenced documentation above. It looks likePbAdslot
andAdServer
are indeed ad-specific and in the right place, similar to how The Media Grid does it in #1807.As for
GPID
, you and The Media Grid are both setting it toPbAdSlot
but in different places in your bid requests. You're setting it in each query string and they are setting it in eachimp.ext
which is fine since that is where your servers are expecting to find that data.I hope that helps.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bsardo thank you for looking into it! let me know if there is anything that I should change for this PR to go in