In-app bidding integration
Last updated
Last updated
App bidding is offered through an endpoint that implements the Open Real-Time Bidding (ORTB) protocol to provide bids on individual impression opportunities. The myTarget SDK is required in app bidding to perform the following actions:
Obtain the buyeruid
(named bidderToken
in the myTarget SDK). This token is a required field in the bid request, and is unique both per user and per app; the token is not valid for another user or app.
Load the bid response, and show an ad if the bidder wins the auction.
Record impressions and clicks.
Obtain the bidder token. VK Ad Network needs this opaque string to respond to a bid request.
Send the bid request and get the bid response. This is the main interaction with the bidding endpoint. In this step, you send a request for an ORTB bid and then receive either a valid bid response or an error.
Run the auction. Run an auction and select a winner from among the bid responses.
Retrieve the ad with the bid response. If VK Ad Network wins the auction, load the ad by passing the ‘id’ field from the bid response to the myTarget SDK on the user's device. Note that the ‘id’ field does not contain the actual ad; it contains information that allows the SDK to retrieve the ad from the myTarget ad server.
Is an auction server calls VK Ad Network bidding endpoint and all other demand sources to get bid responses. Then the auction server runs the auction and picks the winning bid.
Step 1: Making an auction request from Android or iOS client On the client side, we need to gather the required parameters for the auction request, and send it to the auction server using HTTP request. Here is a method in Android and iOS for making the auction request with bidderToken. The method must not be called from the main thread. The token is generated once per session and remains unchanged until the application is restarted.
Android
@WorkerThread String token = MyTargetManager.getBidderToken (context);
iOS
NSString token = [MTRGManager getBidderToken];
Step 2: Loading the ad from bid response on Android/iOS client Using the response parameters, we can tell which platform won the auction, and load the ad. If the auction was successful and VK Ad Network won the auction, the response parameters will contain a payload string (‘bidresponse.seatbid.bid.id
’ param) which we can load the ad from. We can call the loadFromBid
method on the correct ad format class to load the ad.
Android adInstance.loadFromBid (bid_payload);
iOS [adInstance loadFromBid: bid_payload];
VK Ad Network endpoint for server-server integration:
See additional requirements for BidRequest
BidRequest specification requirementsAnd special requirements for in-app biddings integration
imp.tagid
string; required
SlotID for placement in myTarget UI with integration type ‘in-app bidding’
.user.ext.buyeruid
string; required
Buyeruid value received from myTarget SDK getBidderToken
.ext.pid
integer; required
Unique partner key (check with the manager)
You can use these TagIDs to test the health of oRTB requests for each format. When you send an oRTB request for these slots with “test”: 1, you are guaranteed to receive a response if your request is valid. Keep in mind requests/impressions from these slots are not charged and are not counted in your account statistics.
951593
Banner 320*50 (standard)
iOS
951596
Fullscreen
iOS
951599
Native
iOS
951602
Reward
iOS
951605
Banner 300*250 (medium)
iOS
951608
Banner 320*50 (standard)
Android
951611
Fullscreen
Android
951614
Native
Android
951617
Reward
Android
951620
Banner 300*250 (medium)
Android