How long does it take to start tracking your Facebook mobile app ads with AppsFlyer?
If you already have AppsFlyer's SDK integrated in your app, and already have defined your app on Facebook, the answer is less than a minute!
You don't need to implement Facebook Login or integrate your app with Facebook's SDK for mobile tracking. Just follow the step-by-step setup instructions below.
Facebook App ID
But first, if you still haven't defined your app on Facebook, follow these instructions to create the Facebook app ID:
- Visit Facebook's App Dashboard
- Click Create New App under Apps
- Complete the name for your app, and also a unique namespace
Basic Facebook Tracking Setup
To start tracking Facebook campaigns with AppsFlyer, follow these steps:
- When you define your mobile app on Facebook you get its Facebook App ID.
Copy your Facebook App ID and head to your app's dashboard on AppsFlyer.
- Click on Integrated Partners link on the left bar.
- Search for Facebook and click on its logo to open the Facebook setup page.
- On the Integration tab click inside the Facebook App ID box and paste.
- We recommend the Click-Through Attribution Lookback window remains set to 28 days to match with Facebook.
- We recommend the View-Through Attribution Lookback window remains set to 1 day, again, to match with Facebook.
- Press Save & Close.
Congratulations! You have completed basic tracking for Facebook mobile campaigns with AppsFlyer!
(Still not seeing Facebook results on AppsFlyer? Click here)
Advanced Facebook Tracking Setup
With basic tracking already set up for Facebook, it's time for some quick advanced tracking setup.
In-App Events Mapping
- Toggle In-App Event Postbacks to ON
- The Sending Option for all SDK defined events is Events attributed to any partner or organic, i.e., your entire user base is available to be reported to Facebook.
- Click Add Event to add an SDK Event to the list
- Fill in the following parameters:
|SDK Event Name||The name of the event, as received by AppsFlyer either from the SDK integrated in your app, or from server to server events.
Tip - don't see the event you want in the list? Make sure to activate the event on a device with a non-organic installation and recheck.
|Partner Event Identifier||Select the most suitable pre-defined Facebook event tag for your event. You can also send Facebook CUSTOM events.|
|Send Revenue||When unchecked - AppsFlyer sends all the parameters of the rich in-app event to the partner, except for the revenue parameter, which is contained in the af_revenue parameter.
When checked - AppsFlyer sends all the parameters including the revenue value (if exists in the event).
For more information about mapping in-app events with Facebook go here.
AppsFlyer's retargeting attribution for Facebook enables advertisers to attribute an additional engagement of a user with an ad on Facebook, and measure the quality of the user, post engagement, using the AppsFlyer reports.
Cost, Clicks and Impressions Data
Enabling the Facebook Cost feature not only gets you the cost data for your Facebook campaigns, adsets, ads and channel levels. It also gets you the full aggregated clicks and impressions data for them.
- Make sure you are logged into the Facebook user account, which is enabled to handle the account's campaigns on Facebook. The user signing-in must have permissions to run all the campaigns in Facebook Business Manager
- Go to the Data Enrichment tab
- Click the Facebook Login button
- When prompted, allow AppsFlyer to access your Facebook campaign data
If you have several users with permissions to Facebook, the best practice is to perform the Facebook login for all of them, to avoid getting partial data.
For more information about enriching your Facebook information with cost, clicks and impressions data, click here.
Ad Revenue Tracking
If your app uses Facebook Audience Network Ad Revenue for ad monetization, you can track your revenues from Facebook on AppsFlyer. This, with or without in-app purchase revenue data, gives you a complete picture of your user revenues.
To start tracking Facebook Audience Network Ad Revenue:
- On the Data Enrichment tab set Get Ad Revenue Data to ON
- Set the Event Source, which is the event representing your ad revenue model in the best possible way. For example, if your revenue is based on impressions, it is recommended to send AppsFlyer an ad viewed event. The best event can be configured for each monetization platform separately. However, it is also possible to use the
af_app_openedevent. In this case, ad revenue is attributed for every app open performed by the user.
- The Ad Revenue Event is displayed. It is a read-only field presenting the new ad revenue event called [source event]_monetized (e.g. Ad_Watched_Monetized as displayed above). The ad revenue event is presented in the dashboard as an additional event.
- Click Facebook Ad Revenue to enable collection of Facebook Audience Network Ad Revenue on Facebook. Login with your Facebook credentials to authorize Facebook Audience Network Ad Revenue.
- Click Save & Close.
Since May 3rd, following changes to Facebook’s Reporting API, we have been unable to retrieve Audience Network revenue statistics. We are currently working closely with Facebook to find a solution.
Facebook In-App Events Mapping
Advertisers can easily map their in-app events, SDK or S2S, to Facebook's pre-defined events.
This enables advertisers to utilize Facebook’s advanced optimization capabilities, as well as build Custom and Lookalike Audience segments.
Custom In-App Events Mapping
AppsFlyer allows you to map any custom in-app event to send to Facebook, by using the CUSTOM Facebook Event Identifier option.
The event name and the event value (including the event parameters) configured in the SDK are forwarded to Facebook, as is.
To use Facebook optimization capabilities such as App Event Optimization, Value-Based Optimization, and Dynamic Product Ads, it is crucial to map SDK events to the corresponding Partner Event Identifier.
Events mapped to “CUSTOM” are not available for optimization.
For more information about Rich In App Events and their required parameters see here.
Automatic Parameter Mapping with the CUSTOM Event
Through AppsFlyer's deep integration with Facebook, many of AppsFlyer’s standard SDK event parameters are automatically mapped to Facebook's pre-defined parameters. For example, the af_revenue parameter is converted to the valueToSum parameter in Facebook, which allows you to send a revenue per event that can be measured and optimized towards on Facebook.
The following table details all the AppsFlyer event parameters, which when mapped through the CUSTOM event to Facebook, are automatically mapped to Facebook's parameters.
|AppsFlyer Parameter||Facebook Parameter|
Event and Parameter Limitations
There are several limitations Facebook imposes on the sent events data:
- An event can have up to 25 parameters.
- Event names and parameter names must be between 2 and 40 characters, and must consist of only alphanumeric characters, underscores, hyphens or spaces.
- The length of each parameter value can be no more than 100 characters.
- Event names on AppsFlyer can be named the same as Facebook event names (i.e. fb_price), however, these should not be sent as CUSTOM events to Facebook. To keep on the safe side refrain from naming events the same as Facebook event names.
With the exception of the above parameters, AppsFlyer sends the CUSTOM events data as is to Facebook. It is the responsibility of the app owner to verify the events data is on par with Facebook's requirements.
With Facebook you can see data broken down not only by campaigns, ad sets and ads, but also by Facebook channels.
- Facebook channel - users from the Facebook app
- Instagram - users from the Instagram app
- Messenger - users from the Facebook Messenger app
- AudienceNetwork - users from other apps that belong to or are affiliated with Facebook
Use this data to compare the quality of users that you get from the different channels of Facebook.
Facebook and Agencies
Agencies and FMPs can run and track Facebook campaigns on behalf of advertisers on AppsFlyer, or even alongside the advertisers' own Facebook campaigns. In order for the agency campaigns to be attributed to the agency, the campaign name MUST begin with the agency's name.
For more details about agencies and Facebook install tracking please go here.
In addition, agencies can't alter the Facebook look back windows and retargeting toggle. Rather, they need to ask the advertiser to perform these changes if they're needed.
Tracking Facebook for Out-of-Store Android Apps
Facebook doesn't allow creating mobile apps install campaigns for Android apps that are in out-of-store markets, e.g. Baidu.
However, you can advertise and track installs for out-of-store apps on Facebook following these instructions:
- The developer has to prepare a separate APK for each out of store market you use to advertise your app on. More details here.
- Create a "Link click" campaign on Facebook, which sends leads to a landing page.
- The landing page includes a "Download App" button, which has a custom tracking link
behind it. The link MUST include the landing page redirection parameter,
- The lead clicks on the button and is redirected to the out-of-store market. After completing the installation the lead becomes an attributed user.
Since it's not possible to extract the lead's device ID from the landing page on mobile web, AppsFlyer uses fingerprinting as the attribution method.
For specific instructions on tracking apps in Amazon on Facebook click here.
Getting Facebook cost (including clicks and impressions) data is super-easy to set up, but questions about it frequently arise.
Below you can find the most common questions and examples explaining the Facebook cost feature.
Once you set Facebook cost do not change the name of any running Facebook campaign, ad set or single ad as it may cause serious discrepancies or missing cost data.
Facebook Cost FAQs
Upon performing the first Facebook admin login described above AppsFlyer receives Facebook's cost data up to 90 days retroactively for existing campaigns. Cost data from beforehand isn't available.
This cost, clicks and impressions data is collected for all campaigns, which had at least 1 conversion during the last 90 days prior to the initial admin login.
Facebook may reset this permission to get the cost data every few months. If you notice the cost data stopped appearing on the dashboard please repeat the Facebook admin login steps again.
If the Facebook admin user changes their Facebook password the login steps must be repeated as well.
AppsFlyer gets aggregated clicks, impressions and cost data from Facebook periodically every few hours. Therefore, it may take a few hours before these actions are displayed on AppsFlyer's dashboard.
As AppsFlyer gets only aggregated click and impression data from Facebook, the entire set of raw clicks and impressions are not available. The only raw clicks and impressions available in raw reports are those that resulted in installs.
If you filter by Geo location on AppsFlyer's dashboard the summary of the cost data is available, however the data is not available for any specific countries.
There are several inherent differences in Facebook and AppsFlyer's attribution models, which may lead to discrepancies with Facebook cost data:
- Facebook's cross-device attribution - this might sometimes cause issues where a campaign for one platform (iOS/Android) shows an install with its cost for another platform.
- Facebook's non-mobile campaigns - on these campaigns, like Facebook's link click campaigns, desktop users may eventually install mobile apps. For these cross-device campaigns, AppsFlyer does not show cost. However, if the link click was performed by the same device that installed the app, cost data is received.
For example, a Facebook user clicks on an ad leading to the advertiser's landing page on a desktop computer. A week later the same Facebook user installs the advertiser's iOS app on an iPhone device. While the install is attributed and displayed on AppsFlyer's dashboard, the cost of this cross-platform install is not.
- Campaigns with 0 results in the last 7 days - AppsFlyer syncs the cost only for campaigns that had installs/conversions in the past 7 days. If Facebook cost was just set, campaigns which were inactive for more than 7 days beforehand will not show cost.
The Cost Per Install is calculated by dividing the total cost with the number of installs. Since AppsFlyer counts installs differently from Facebook the eCPI will usually differ between the two.
Even if there are several Facebook users with permissions to run campaigns in the Facebook Business Manager, only one of them is required to perform the Facebook login described above.
However, if this user does not have access on Facebook to some of the running campaigns, the result is campaigns that are displayed on AppsFlyer's dashboard, but lack the cost, clicks and impression data.
Currently Facebook cost data is only displayed for user acquisition campaigns, and not for retargeting campaigns.
If you are is signed in to Facebook on the same browser that you are performing the configuration, the window automatically connects to Facebook using those credentials and if access has already been grated to AppsFlyer's app, then there is nothing to do and the window closes.
Facebook Cost Examples
Mr A Flyer is an advertiser.
He is running two separate campaigns on Facebook Mobile App Installs during the period March 27 – April 3.
Campaign A: UK_Female_30:
Cost: $1000 (total spend of the campaign, as provided by Facebook)
eCPI: $1,000 / 400 (total number of installs generated by the campaign) = $2.5
Campaign B: US_Male_30:
eCPI: $500 / 100 (total number of installs generated by the campaign) = $5
In the table above, Mr Flyer’s Facebook campaign cost is calculated per campaign.
In the aggregated performance report (presented by default), you can see the information provided by AppsFlyer at a higher level (total of all Facebook campaigns):
According to the table above, Mr Flyer’s total Facebook campaign cost is calculated as follows:
All Facebook campaigns:
Total cost: $1,000 + $500 = $1,500 (total spend of the campaigns, as provided by Facebook)
Total installs: 400 + 100 = 500
eCPI: $1,500 / 500 = $3 (eCPI is calculated for each campaign / Adset / Ad at the end of each day).
Facebook Integration Troubleshooting
If you have completed the basic integration and still not seeing results from Facebook on AppsFlyer's dashboard, first verify that you have new installs from Facebook since the integration.
If so, please consult the main reasons below for solving this issue:
As stated in the SDK Integration Guide - iOS, you must add the AdSupport.framework to your project for IDFA collection to take place. Although in most cases attribution still works with finger-printing, IDFA collection is mandatory for working with Facebook. Check the Installation Raw Data report to see if the IDFA column is indeed empty or not.
Android installs work on Facebook even without GAID collection, but it is highly recommended to have it implemented too.
Even if the reply is not an error there is still the possibility the user confused the Facebook App IDs for the iOS and Android apps.
When setting up the Facebook app install campaign you can select the app from a drop-down list or paste the full store URL to the app. While both work on Facebook, the second method fails AppsFlyer's attribution.
Correct set-up - attribution works.
Incorrect set-up - attribution fails.
By default Facebook sends only the conversion and engagement data. However, you can easily also start getting clicks, impressions and cost data for your Facebook campaigns.
1. Go to Facebook's setup window on AppsFlyer
2. Click on Terms of service (highlighted in blue in the capture below)
3. Continue on Facebook and agree to the terms of service
OR go directly to Facebook here.
Once agreed, historical Facebook RAW data are available in AppsFlyer.
If you do use both SDKs make sure NOT to pass to Facebook's SDK any in-app events sent to AppsFlyer, to avoid double reporting on Facebook.
Configuring these windows to be shorter on AppsFlyer, decreases Facebook attribution on AppsFlyer.
On the other hand, configuring them longer on AppsFlyer has no effect, as installs taking part after Facebook's windows end, do not get attributed to Facebook.