Advanced integrations

Custom publisher Id

In case you want to set a custom identifier for the current player, which will be sent alongside BE calls:

NeftaAds.Instance.SetCustomPublisherUserId("player23");
NeftaPlugin._instance.SetPublisherUserId("player23");
NeftaPlugin._instance.SetPublisherUserId(id: "player23")
[NeftaPlugin._instance SetPublisherUserIdWithId: @"player23"];

Bid floor

Bid floor may be set dynamically at runtime. This will ensure only ads above the specified minimum price are served:

NeftaPlugin.Instance.SetFloorPrice("3434234238554", 0.42);
NAd ad = new NInterstitial("adUnitId");

ad._floorPrice = 0.5f;
NeftaPlugin._instance.SetFloorPrice(id: "3434234238554", floorPrice: 0.42)
[_plugin SetFloorPriceWithId: @"5679149674921984" floorPrice: 0.3];

Server to Server integration

Nefta may be integrated as a server to server configuration. Standard openRtb requests may be sent directly to Nefta's servers. Your custom endpoint will be provided as part of the integration process. Please note however certain fields and extensions need be set in the openRtb request as shown here:

{
   "imp":[
      {
         "tagid":"3434234238554" //  Nefta placementId
      }
   ],
   "ext":{
      "nefta":{
         "nuid":"67ffd4ba-1c47-48e5-9c4f-df30fd0c4f25",
         "sid":123,
         "sdk_version":"3.3.2"
      }
   }
}

The sdk facilitates this by providing you with a function that generates this partial bidRequest. Simply combine it with the rest of your standard openRtb bidRequest:

string partialBidRequest = Nefta.Adapter.Instance.GetPartialBidRequest("3434234238554");
NAd ad = new NInterstitial("adUnitId");

ad.GetPartialBidRequest();
let partialBidRequest = NeftaPlugin._instance.GetPartialBidRequest(id: "3434234238554")
NSDictionary *partialBidRequest = [_plugin GetPartialBidRequest: @"3434234238554"];

Should your demand prioritisation logic select the Nefta network as the winning bid, you may load the selected Nefta ad as shown below:

_plugin.LoadWithBidResponse("3434234238554", bidResponse);
NAd ad = new NInterstitial("adUnitId");
        
ad.LoadWithBidResponse(bidResponse);
NeftaPlugin._instance.LoadWithBidResponse(id: "3434234238554", bidResponse: bidResponse)
[_plugin LoadWithBidResponseWithId: @"dfd", bidResponse: bidResponse];

After this, the OnLoad callback will be fired for this placement and you can proceed with calling Show.