Website to Desktop App – Coming Soon!

Join the waitlist now and get an exclusive early-bird discount when we launch!

+91

By filling this form you are granting the permission to share your details with Webtonative

Facebook App Events

Facebook App Events

Collect analytics, measure Facebook Ad performance and build audiences for Facebook Ad targeting by integrating Facebook App Events into your app. This guide provides detailed instructions on configuring and using Facebook App Events, including both automatically logged and custom events.

Setup and Configuration of Facebook App Events

1. Add Facebook App Events

Click on "Add" button to add Facebook App Events. Once you add, it will appear in Add-ons menu.

Screenshot 2025-05-12 172544.png


2. Configure Facebook App Events

After adding the add-on, you will see the settings option in the section. Then, Go to the Facebook App Events settings.

Screenshot 2025-05-12 172728.png


  • Autolog FB Events: Enable or disable automatic logging of events.
  • Client Token: Enter your Facebook app's client token.
  • App ID: Enter your Facebook app ID.

Screenshot 2025-05-12 173601.png

Save your changes and Rebuild your app to see the changes are in action, after configuring the Facebook App Event settings.


Automatically Logged Events

When using the Facebook SDK, certain events in your app are automatically logged and collected for Facebook Events Manager unless you disable this feature. These events are useful for targeting, measurement, and optimization.

Learn More:


Manually Log Events (Custom Events)

To send custom events to Facebook, use the following methods:

1. Regular Events

Plain JavaScript:

const { events: FacebookEvents } = window.WTN.facebook;
 
FacebookEvents.send({
  event: "MY_EVENT",
  valueToSum: 10, // optional
  parameters: { // optional
    name: "webtonative"
  }
});

ES6+ Syntax:

import { send } from "webtonative/Facebook/events";
 
send({
  event: "MY_EVENT",
  valueToSum: 10, // optional
  parameters: { // optional
    name: "webtonative"
  }
});

2. Purchase Events

There is a special case for purchases where Facebook's SDK will send the event more immediately.

Plain JavaScript:

const { events: FacebookEvents } = window.WTN.facebook;
 
FacebookEvents.sendPurchase({
  amount: 3.14,
  currency: "INR",
  parameters: { // optional
    name: "webtonative"
  }
});

ES6+ Syntax:

import { sendPurchase } from "webtonative/Facebook/events";
 
sendPurchase({
  amount: 3.14,
  currency: "INR",
  parameters: { // optional
    name: "webtonative"
  }
});

Event Names and Parameter Keys

To ensure correct event names and parameter keys, refer to the official documentation: