Posting In-App Events to Facebook

Introduction

Before starting this process, make sure the Facebook App ID is configured on the AppsFlyer dashboard. If you have already performed this, you can jump to step 2 below.

Configuring the Facebook App ID

To use Facebook mobile app ads, you must create a Facebook application. This does not mean you have to implement Facebook Login or integrate your app with Facebook; you only need an app on Facebook to get an app ID. If you do not already have one, you can create this by visiting the App Dashboard and clicking Create New App under Apps.

You are asked to provide a name for your app and a unique namespace.

Once you have the Facebook App ID simply go to Integrated Partners configuration select Facebook and paste the Facebook App ID in the appropriate place:

The In-App Events Tab

Select the option for what you want to do with sending in-app events to Facebook.

1. Off (to stop sending In-App events to Facebook).

2. Send All In-App Events (organic and non organic) to Facebook (For sending all In-App events to Facebook regardless of which media source generated them).

3.  Once you have finished your configuration settings, click Save & Close.

Configuring In-App Event Mapping

Using the dropdown, select the event you would like to post to Facebook and then choose the event as predefined by Facebook or Custom event. You can select Send Value if you want to send the Facebook-supported event values as well.

For Example:

Custom In-App Event Mapping

AppsFlyer allows you to map any custom in-app event to send to Facebook, by using the CUSTOM Facebook Event Tag option.  

The event name and the event value (including the event parameters) configured in the SDK are forwarded to Facebook, as is.   

Automatic Parameter Mapping with the CUSTOM Event

Through AppsFlyer's deep integration with Facebook there are dozens of SDK event parameters, which automatically get mapped to Facebook's pre-defined parameters. For example, af_revenue parameter is converted to the valueToSum parameter in Facebook, which allows you to put a revenue per event that can be monitored in the Facebook account.

The following table details all the AppsFlyer event parameters, which when mapped through the CUSTOM event to Facebook, get mapped into Facebook's parameters.

AppsFlyer Parameter Facebook Parameter
af_city  fb_city
af_class  fb_travel_class
af_content_id  fb_content_id
af_content_list  fb_content_id
af_content_type fb_content_type
af_country fb_country
af_currency  fb_currency
af_date_a  fb_checkin_date
af_date_b fb_checkout_date
af_departing_arrival_date  fb_departing_arrival_date
af_departing_departure_date  fb_departing_departure_date
af_description  fb_description
af_destination_a  fb_origin_airport
af_destination_b  fb_destination_airport
af_destination_list  fb_destination_ids
af_hotel_score fb_hotel_score
af_level  fb_level
af_max_rating_value  fb_max_rating_value 
af_num_adults  fb_num_adults
af_num_children  fb_num_children
af_num_infants  fb_num_infants
af_order_id fb_order_id
af_payment_info_available  fb_payment_info_available 
af_preferred_neighborhoods  fb_preferred_neighborhoods
af_preferred_num_stops fb_preferred_num_stops
af_preferred_price_range  fb_preferred_price_range
af_preferred_star_ratings  fb_preferred_star_ratings
af_price  fb_price
af_quantity  fb_num_items
af_region  fb_region
af_registration_method  fb_registration_method 
af_returning_arrival_date  fb_returning_arrival_date
af_returning_departure_date  fb_returning_departure_date
af_revenue  _valueToSum
af_search_string  fb_search_string 
af_success fb_success
af_suggested_destinations  fb_suggested_destinations
af_suggested_hotels  fb_suggested_hotels
af_travel_end fb_travel_end
af_travel_start  fb_travel_start
af_user_score  fb_user_score

Event and Parameter Limitations

There are several limitations Facebook imposes on the sent events data:

  1. An event can have up to 25 parameters.
  2. Event names and parameter names must be between 2 and 40 characters, and must consist of only alphanumeric characters, _, -, or spaces.
  3. The length of each parameter value can be no more than 100 characters.
  4. Event names on AppsFlyer MAY be called with a Facebook event name (i.e. fb_price), but then SHOULD NOT be sent as Custom events to Facebook. To keep on the safe side refrain from calling events with Facebook event names.

 Warning

Except for 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.

Was this article helpful?
1 out of 2 found this helpful