Prebid Server | Endpoints | Events (Java-only)

PBS-Java supports events as described in these GitHub issues:

GET /event

This endpoint alerts Prebid Server to process the event. Most of the time this just means informing the analytics adapter. But it’s also used in the Programmatic Guaranteed context to affect line item pacing.

Query Params

Query Parameter Required? Description
a y Account ID
t y Type of the event. Allowed values: win or imp
b y Bid ID, expected to be unique so this event can be joined to the auction analytics.
bidder y Bidder code
f n Format of the PBS response. Values: b is blank, just return HTTP 200 with an empty body. i is image, return HTTP 200 with a blank PNG body
ts n Auction timestamp
x n Disables or enables analytics. Allowed values: 1 to enable analytics or 0 to disable. 1 is default.

Sample request

GET http://prebid.site.com/event?t=win&b=1234567890&bidder=rubicon&f=i

POST /vtrack

This endpoint covers there scenario where VAST XML is returned in the response from a client-side adapter. Prebid.js forwards the XML to PBS on a new endpoint that instructs PBS to update the XML and cache it

If the bidder allows PBS to modify their VAST, the server then injects an tag into the VAST, referring to a prebid server event string, then caches the modified results. It forwards the response from Prebid Cache.

The contents of the tag are pulled from a new event.url-template property that has macros that need to be resolved. e.g.

event:
    url-template: "/event?t=imp&b=%s&f=b&a=%s"

where b=BIDID, a=ACCOUNT

The algorithm for inserting the tag is simple -- search for an existing tag and add another underneath it. If there isn't an existing tag, no modifications are made.

Query Params

Query Parameter Required? Description
a yes Account id

POST Body Params

Query Parameter Required? Description
bidid y Will enable offline analytics join this impression event to the original auction event
bidder y Prebid bidder code
timestamp n Auction timestamp as generated by Prebid.js. Useful in offline joins
type y Always “xml”
value y VAST XML
ttlseconds n How long this VAST should be cached

Sample request

POST https://prebid-server.rubiconproject.com/vtrack?a=ACCOUNT

{"puts":[{
    "bidid": "BIDID",
    "bidder": "BIDDER",
    "type":"xml",
    "value":"<VAST.../VAST>",
    "ttlseconds":3600
}]}