iOS SDK  7.3.0
 All Classes Files Functions Properties Pages
FlurryAdTargeting Class Reference

Provides available methods for targeting. More...

#import <FlurryAdTargeting.h>

Inherits NSObject.

Class Methods

(FlurryAdTargeting *) + targeting
 

Properties

CLLocation * location
 Set the location for Ad Targeting. More...
 
NSDictionary * userCookies
 Sets a dictionary of key/value pairs, which will be transmitted to Flurry servers when a user clicks on an ad. More...
 
NSDictionary * keywords
 Sets a dictionary of key/value pairs, which will be transmitted to Flurry servers when an ad is requested. More...
 
BOOL testAdsEnabled
 

Detailed Description

Provides available methods for targeting.

Set of methods that allow publishers to provide targeting information for a device.

Note
This object is meant to be used with the FlurryAds object APIs. For static APIs please continue to use the equivalent static APIs
See Also
The APIs for ad targeting with the static Ads APIs
+ setLatitude:longitude:horizontalAccuracy:verticalAccuracy: (Flurry)
+ setKeywordsForTargeting: (FlurryAds)
+ setAge: (Flurry)
+ setGender: (Flurry)
+ setUserCookies: (FlurryAds)
Author
2009 - 2014 Flurry, Inc. All Rights Reserved.
Version
6.0.0

Definition at line 43 of file FlurryAdTargeting.h.

Property Documentation

- (NSDictionary*) keywords
readwritenonatomicstrong

Sets a dictionary of key/value pairs, which will be transmitted to Flurry servers when an ad is requested.

Since
6.0.0

Keywords allow the developer to specify information on a user executing an ad action for the purposes of targeting. These keywords are transmitted to the Flurry servers on this ad object's ad request. If corresponding keywords are matched on the ad server, a subset of targeted ads will be delivered. This allows partners to supply information they track internally, which is not available to Flurry's targeting system.

Note
Calling this method with a nil or empty dictionary will clear any previously passed keywords. Calling this method a second time with a valid dictionary will replace the previous entries.
- (void) showInterstitialAddKeywords
{
NSDictionary *keywords =
[NSDictionary dictionaryWithObjectsAndKeys:@"UserParameterValue", // Parameter Value
@"UserParameterName", // Parameter Name
nil];
FlurryAdInterstitial* adInterstitial = [[FlurryAdInterstitial alloc] initWithSpace:@"MAIN_SCREEN_INTERSTITIAL"];
FlurryAdTargeting* adTargeting = [FlurryAdTargeting targeting];
adTargeting.keywords = keywords;
adInterstitial.adTargeting = adTargeting;
[adInterstitial fetchAd];
}
Parameters
keywordsThe information about the user to be used in targeting an ad. Note: do not transmit personally identifiable information in keywords.

Definition at line 136 of file FlurryAdTargeting.h.

- (CLLocation*) location
readwritenonatomicstrong

Set the location for Ad Targeting.

Since
6.0

Use information from the CLLocationManager to specify the location for Ad Targeting. Flurry does not automatically track this information or include the CLLocation framework.

Note
The location information set here is not persisted on the user's device. Regardless of accuracy specified, the Flurry SDK will only report location at city level or higher. Location is aggregated across all users of your app and not available on a per user basis. This information should only be captured if it is germaine to the use of your app.
CLLocationManager *locationManager = [[CLLocationManager alloc] init];
[locationManager startUpdatingLocation];

After starting the location manager, you can set the location with FlurryAdTargeting. You can implement CLLocationManagerDelegate to be aware of when the location is updated. Below is an example of how to use this method, after you have recieved a location update from the locationManager.

-(void) locationManager: (CLLocationManager *)locationManager
didUpdateToLocation: (CLLocation *) newLocation
{
FlurryAdTargeting* adTargeting = [FlurryAdTargeting targeting];
adTargeting.location = locationManager.location;
}
Parameters
locationA CLLocation object containing latitude and longitude.

Definition at line 82 of file FlurryAdTargeting.h.

- (NSDictionary*) userCookies
readwritenonatomicstrong

Sets a dictionary of key/value pairs, which will be transmitted to Flurry servers when a user clicks on an ad.

Since
6.0.0

UserCookies allow the developer to specify information on a user executing an ad action. On each ad click the UserCookies are transmitted to the Flurry servers. The UserCookie key/value pairs will be transmitted back to the developer via the app callback if one is set. This is useful for rewarded inventory, to identify which of your users should be rewarded when a reward callback is sent.

Note
Calling this method with a nil or empty dictionary will clear any previously set user cookies. Calling this method a second time with a valid dictionary will replace the previous entries.
- (void) showInterstitialAddUserCookies
{
NSDictionary *cookies =
[NSDictionary dictionaryWithObjectsAndKeys:@"xyz123", // Parameter Value
@"UserCharacterId", // Parameter Name
nil];
FlurryAdInterstitial* adInterstitial = [[FlurryAdInterstitial alloc] initWithSpace:@"MAIN_SCREEN_INTERSTITIAL"];
FlurryAdTargeting* adTargeting = [FlurryAdTargeting targeting];
adTargeting.userCookies = cookies;
adInterstitial.adTargeting = adTargeting;
[adInterstitial fetchAd];
}
Parameters
userCookiesThe information about the user executing ad actions. Note: do not transmit personally identifiable information in the user cookies.

Definition at line 109 of file FlurryAdTargeting.h.


The documentation for this class was generated from the following file: