Targeting by App Activity

Create AdVerify Your App Ads Setup

What is Targeting by App Activity?

You can create ads targeting people based on the actions they are taking within your app. For example, you can target people who previously used your app, but have not come back to your app within the last 90 days. Or you can target people who have added an item to their cart but didn't make a purchase. Such targeting configurations are called Custom Audiences in the Facebook Ads Manager that key off of the App Events in your app.

Why is this Important?

Instead of lumping all people using or not using your app together, you can reach the relevant audience for your needs.

Requirements

You need to add App Events to your app to track actions people are taking within your app.


You can also create custom audiences using a customer list. The list may be based on emails, phone numbers, Facebook user IDs or mobile advertiser IDs to target people using Facebook.

Before You Start: Read our Essential Guides

1. Creating Ads for Apps

Learn how ads for apps work.

2. Using the Facebook SDK with Ads for Apps

In most cases you need to add the Facebook SDK before creating your custom audiences.

3. Example Case: Bring people back to your App

This guide will teach you how to create custom audiences for your ads.

4. Learn about App Events

Important: Only events that actually occurred in your app will be available for creating custom audiences.

Recently Opened your App

1. Add App Launch Tracking to your App

To create a custom audience based on recent activity you need to track app launches using App Events. Track app launches by calling the activateApp method:

- (void)applicationDidBecomeActive:(UIApplication *)application {
   [FBSDKAppEvents activateApp];
}
@Override
protected void onResume() { 
  super.onResume(); 
  AppEventsLogger.activateApp(this); 
}
FB.AppEvents.activateApp();

2. Create Custom Audience by Recent Activity

Start creating a new ad. At the point of defining your ad audience create new custom audience and pick the following options when filling out the custom audience form:

"Create Custom Audience" From Option Your Value

Type of Audience

App Activity

Action Taken

App Launches

In The Last

60 days

Recently Completed a Purchase

1. Add Purchase Logging to your App

To create a custom audience based on purchase behavior you need to log purchases using App Events. Track purchases using the logPurchase method:

[FBSDKAppEvents logPurchase:4.32 currency:@"USD"];
logger.logPurchase(BigDecimal.valueOf(4.32), Currency.getInstance("USD"));
var parameters = {};
parameters[FB.AppEvents.ParameterNames.CONTENT_ID] = "QW-12345";
FB.AppEvents.logPurchase(4.32, "USD", parameters);

2. Create Custom Audience by Purchases

Start creating a new ad. At the point of defining your ad audience create new custom audience and pick the following options when filling out the custom audience form:

"Create Custom Audience" From Option Your Value

Type of Audience

App Activity

Action Taken

Purchases

In The Last

30 days

Advanced 1: Narrow your Audience using "Combined Actions"

You may also want to exclude a smaller part of your audience from your ads. For example, you may want to reach users who have purchased within your app in the past 30 days, but not the past 7.

Choose the option Combined Action and two events:

  1. Actions people have taken.
  2. Actions people have not taken.
"Create Custom Audience" From Option Your Value

Type of Audience

App Activity

List of people based on ...

Combined Action

Action Taken

Add to Cart

In The Last

30 days

Action Not Taken

Add to Cart

In The Last

7 days

Advanced 2: Create Custom Audience by Abandoned Carts

Target people who expressed interest in completing a purchase but haven't done so by using the following options:

"Create Custom Audience" From Option Your Value

Type of Audience

App Activity

List of people based on ...

Combined Action

Action Taken

Add to Cart

In The Last

30 days

Action Not Taken

Purchases

In The Last

30 days


Completed Large Purchases

1. Add Purchase Logging to your App

Take same steps as in Recently Completed a Purchase: 1. Add Purchase Logging to your App.

2. Create Custom Audience by Large Purchases

Start creating a new ad. At the point of defining your ad audience create new custom audience and pick the following options when filling out the custom audience form:

"Create Custom Audience" From Option Your Value

Type of Audience

App Activity

Action Taken

Purchases

Event's USD Value

is geater than 100

In The Last

90 days

Achieved a level

1. Add Event Tracking to your App

To create a custom audience based on level achievements you need to track such events using App Events. Track level achievements - or other events - by calling the logEvent method and providing a level parameter:

[FBSDKAppEvents logEvent:FBSDKAppEventNameAchievedLevel
  valueToSum:nil
  parameters:@{ 
    FBSDKAppEventParameterNameLevel: 123
  }
];
AppEventsLogger logger = AppEventsLogger.newLogger(this);
Bundle parameters = new Bundle();
parameters.putString(AppEventsConstants.EVENT_NAME_ACHIEVED_LEVEL, 123);
logger.logEvent(
  AppEventsConstants.EVENT_NAME_ACHIEVED_LEVEL,
  null,
  parameters
);
var parameters = {};
parameters[FB.AppEvents.ParameterNames.LEVEL] = 123;
FB.AppEvents.logEvent(
  FB.AppEvents.EventNames.ACHIEVED_LEVEL,
  null,
  parameters
);

2. Create Custom Audience by Level Achievement

Start creating a new ad, choose App Engagement as your objective. At the point of defining your ad audience create new custom audience and pick the following options when filling out the custom audience form:

"Create Custom Audience" From Option Your Value

Type of Audience

App Activity

Action Taken

Levels Achieved

Level

is any of 123

In The Last

28 days

Important Bookmarks

Bookmark these links to our most important ads tools:

Manage Your Custom AudiencesTest Your App (App Ads Helper)Create Ad