You must initialize the DT FairBid SDK using your DT App ID. This only needs to be performed once, ideally when the app is launched.
App ID
In the initialization code, replace the your_app_id
value with the your App_ID
. This value is passed as a string.
import com.fyber.FairBid
FairBid.start("your_app_id", activity)
Java
import com.fyber.FairBid;
FairBid.start("your_app_id", activity);
import FairBidSDK
FairBid.start(withAppId: "your_app_id")
Objective-C
#import <FairBidSDK/FairBid.h>
[FairBid startWithAppId:@"your_app_id"];
using Fyber;
FairBid.Start("your_app_id");
The DT App ID can be found in the App Management dashboard in the DT Console:
- Log in to the console, then click Monetization -> App Management
- A list of your apps is displayed. Next to each app you can find and copy the corresponding App ID:
- If you haven't set-up your app in the console yet, follow this guide
User ID
The User_ID
is a unique identifier that allows you to recognize your individual users.
It is highly recommended to set a User_ID
, as it greatly assists with key functions such as server side rewarding, counting unique users accurately and user level reporting.
You can provide your own internal User_ID
. If you don’t already have one, we recommend you create one by assigning incremental numbers to each of your users or a similar method.
// recommended
UserInfo.setUserId("user_id")
Java
// recommended
UserInfo.setUserId("user_id");
import FairBidSDK
FairBid.user().userId = "your_user_id"
Objective-C
#import <FairBidSDK/FairBid.h>[
FairBid user].userId = @"user_id";
// recommended
UserInfo.SetUserId("user_id");
Important
The User_ID
length must not exceed 256 characters.
Once you've successfully initialized the SDK, you can incorporate the Ad Format code snippets in your app.