Follow

Enjoy Higher eCPM with Demographic - Targeted Ads

View original article on our GitHub

If you know your user's gender, age or location, StartApp can use it to serve better-targeted ads which can increase your eCPM and revenue significantly.

Set Age and Gender

Upon initialization, after providing your DevId and AppId, use the following line:

sdk.preferences = [STASDKPreferences prefrencesWithAge:<USER_AGE> andGender:<USER_GENDER>];
  • Replace <USER_AGE> with the user's real age
  • Replace <USER_GENDER> with the user's real gender, using STAGender_Male orSTAGender_Female.

Example

// AppDelegate.m

#import <StartApp/StartApp.h>

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    // initialize the SDK with your appID and devID
    STAStartAppSDK* sdk = [STAStartAppSDK sharedInstance];
    sdk.appID = @"your app Id";
    sdk.devID = @"your developer id";

    sdk.preferences = [STASDKPreferences prefrencesWithAge:22 andGender:STAGender_Male];

    return YES;
}

Set Location

The location of the user is a dynamic property which is changed constantly. Hence, you should provide it every time you load a new Ad:

[startAppAd loadAdWithAdPreferences:[STAAdPreferences prefrencesWithLatitude:<Real_Longitude> andLongitude:<Real_Latitude>]];

Example

- (void) viewDidAppear:(BOOL)animated {
    [super viewDidAppear:animated];

        [startAppAd loadAdWithAdPreferences:[STAAdPreferences prefrencesWithLatitude:37.3190383911 andLongitude:-121.96269989]];
}

 

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments