Events and Parameters

Events and parameters describe the action a user completes along with the data in the action. An event is the action that the user completes and the parameters for the event contain the data associated with that event.

Events are broken down into three categories:

  • Standard events - events and parameters that are defined in the Facebook SDK and are generated by your app.
  • Custom events - events and parameters that you define and are generated by your app.
  • Auto-logged events - events and parameters that are inferred by Facebook based on user interactions with your app and automatically logged.

Implementing Events

To implement an event and parameters, use the App Event Builder to generate the necessary code. Add this code appropriate code section of your app.

To Generate Code for a Standard Event

  1. Choose the Standard Event tab.
  2. In Event Name, choose a standard event.
  3. Choose Get Code.
  4. In the window, select a language to see the code to copy and paste into your app.

To Generate Code for a Custom Event

  1. Choose the Custom Event tab.
  2. In Event Name, enter the name of you custom event.
  3. In Use Value to Sum?, choose On if you will have this value.
  4. For each parameter in your custom event, choose Add Event Parameter, enter the name of the parameter, and then choose a data type.
  5. Choose Get Code.
  6. In the window, select a language to see the code to copy and paste into your app.

Standard Events

Event NameDescription

Achieve Level

Log this event when a person achieves specific levels you define within your application, business, or organization.


Add Payment Info

Log this event during the addition of customer payment information during a checkout process.


Recommended Parameters

  • content_category
  • content_ids
  • contents
  • currency
  • value

Add to Cart

Log this event during the addition of an item to a shopping cart or basket (example: clicking an Add to Cart button on a website).


Recommended Parameters

  • content_ids*
  • content_name
  • content_type*
  • contents*
  • currency
  • value

*Required parameters for Dynamic Ads.

Add to Wishlist

Log this event during the addition of items to a wishlist (example: clicking an Add to Wishlist button on a website).


Recommended Parameters

  • contentData
  • contentId
  • contentType
  • currency

Complete Registration

Log this event during the submission of information in exchange for a service provided by your business (example: sign up for email subscription).


Recommended Parameters

  • content_name
  • currency
  • status
  • value

Complete Tutorial

Log this event during the completion of a tutorial on your app.


Contact

Log this event during a telephone/SMS, email, chat, or other type of contact between a customer and your business.

Customize Product

Log this event during the customization of products through a configuration tool or other application your business owns.

Donate

Log this event during the donation of funds to your organization.

Find Location

Log this event when a web or app search for one of your business locations suggest that someone might intend to visit (example: searching for a product and finding it at one of your local stores.

In-App Ad Click

Log this event when an ad from a third-party platform is clicked within your app.

In-App Ad Impression

Log this event when an ad from a third-party platform appears on-screen within your app.

Initiate Checkout

Log this event at the start of a checkout process.


Recommended Parameters

  • content_category
  • content_ids
  • contents
  • currency
  • num_items
  • value

Purchase

Log this event during the completion of a purchase, usually signified by receiving order/purchase confirmation or a transaction receipt

If you use Facebook to manage your in-app purchases, the purchase events are automatically logged.


Required Parameters

  • currency
  • value

Recommended Parameters

  • content_ids*
  • content_name
  • content_type*
  • contents*
  • num_items

*Required for Dynamic Ads

Rate

Log this event during a rating of something within your app, business, or organization (example: rates a restaurant within a restaurant review app).

Schedule

Log this event during the booking of an appointment to visit one of your locations.

Search

Log this event during a search performed on your website, app or other property (example: product searches, travel searches).


Recommended Parameters

  • content_category
  • content_ids
  • contents
  • currency
  • search_string
  • value

Spend Credits

Log this event during the completion of a transaction where people spend credits (example: in-app currency) specific to your business or application.


Start Trial

Log this event at the start of a free trial of a product or service you offer (example: trial subscription).


Recommended Parameters

  • currency
  • predicted_ltv
  • value

Submit Application

Log this event during the submission of an application for a product, service, program you offer example: credit card, educational program, or job).

Subscribe

Log this event at the start of a paid subscription for a product or service you offer.


Recommended Parameters

  • currency
  • predicted_ltv
  • value

Unlocked Achievement

Log this event during the completion of specific activities or actions you want to reward within your application, business or organization (refer a friend, complete your profile, etc.).

View Content

Log this event during a visit to a content page you care about, such as a product page, landing page or article.


Recommended Parameters

  • content_ids*
  • content_name
  • content_type*
  • contents*
  • currency
  • value

*Required for Dynamic Ads

If none of the standard events will work for you, then you can use a custom event. Each custom event you create can have up to 25 parameters that you can also define. You can create up to 1,000 custom events.

Auto-logged Events

Event NameDescription

Install App

Log this event during an installation of your app onto a mobile phone.

Journey

Log this event when your app is accessed from a different platform. The app administrator must enable Journeys in the Facebook analytics dashboard to generate this event.

Launch App

Log this event during the opening of your app after it's already been installed.

Although you can create up to 1,000 custom events, you should create the minimum number of custom events to make data management easier. One way to create the minimum number of custom events is differentiate events by using parameters instead of create an event for each action.

For example, if your website or mobile app has several menu items, use a single event to log the action of choosing a menu item and then use a parameter to describe the menu item.

Parameter

A parameter is a collection of key value pairs that provide the date about an event. Each key in the parameter must have a unique name. You can use the parameter names defined in the SDK or create a unique name. The value of the key value pair must be either a string or a number. Whenever possible, define the appropriate value for each key value pair and ensure that the value that you will assign in the key value pair is the appropriate value. For example, assign strings to a key value pair expecting a string and assign a number to a key value pair that is expecting a number. Checking the data before assignment is especially critical if your app is written in a weakly typed language, such as JavaScript.

The example e-commerce website and mobile app has several steps to a successful route. The following is an example of how to use events to describe each step.

StepEvent NameEvent Type

Open the web page or install and start the mobile app.

Install App

Auto-logged

Search for an item.

Search

Custom

Add an item from the search results to a wish list.

Add to Wishlist

Standard

Move an item from a wish list to a shopping cart.

Add to Cart

Standard

Start the checkout process.

Initiate Checkout

Standard

Complete the registration.

Complete Registration

Standard

Purchase the item.

Purchase

Standard

Review shipping information when the item has shipped.

Review Shipping

Custom

Do not send personal identifiable information (PII) or any data that has a 1:1 relationship with a user in a parameter.