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. See Scenarios below for links to examples.
To target people by app activity, create a Custom Audience based on App Events. This page tells you how.
You can reach the relevant audience for your needs. You can also provide a more positive experience by showing ads only to people who are likely to be interested in them.
You need to add App Events to your app to track actions people are taking within your app.
Custom audiences can also be based on customer lists. See Targeting by Customer Lists.
Events that your app collects and sends to Facebook may require you to disclose these data types in the App Store Connect questionnaire. It is your responsibility to ensure this is reflected in your application’s privacy policy. Visit the Apple App Store Privacy Details article to learn more about the data types you will need to disclose.
Learn how ads for apps work.
In most cases, you need to add the Facebook SDK before creating your custom audiences.
This guide walks you through an example so you can learn how to create a custom audience.
Learn how app events work.
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];
}
Start creating a new ad. In Audience, choose Create New > Custom Audience and pick the following options:
Option | Your Value |
---|---|
Type of audience | App Activity |
Action taken | Opened the app |
In the past | 30 days |
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"];
Start creating a new ad. In Audience, choose Create New > Custom Audience and pick the following options:
Option | Your Value |
---|---|
Type of audience | App Activity |
Action taken | Purchase amount: Top 25% |
In the past | 30 days |
You may also want to target your ads to a more specific audience. For example, you may want to reach users who have made a purchase within your app in the past 30 days, but not the past 7.
Choose Exclude, and choose the following options:
Option | Your Value |
---|---|
Action taken | Purchase amount: Top 25% |
In the past | 7 days |
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 |
|
List of people based on ... |
|
Action Taken |
|
In The Last |
|
Action Not Taken |
|
In The Last |
|
Take same steps as in Recently Completed a Purchase: 1. Add Purchase Logging to your App.
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 |
|
Action Taken |
|
Event's USD Value | is geater than |
In The Last |
|
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
}
];
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 |
|
Action Taken |
|
Level | is any of |
In The Last |
|