🕵️Send Custom Event
This feature allows you to send custom events and associated metadata directly to your configured Analytics service provider (e.g., AppsFlyer, Facebook)
Prerequisites
The Analytics feature must be enabled for your app. Follow this guide for setup: Analytics
Availability:
Bubble Plugin Version: 2.25.0 or higher
JavaScript SDK Version: 2.19.1 or higher
Bubble.io Plugin
[Action] Natively - Send Custom Event
Event name - The unique identifier that will appear in your Analytics dashboard. (e.g.,
user_onboarded,checkout_started)Event data - A JSON object containing custom parameters and values you want to send with the event
Usage Example (Bubble Workflow)
In your workflow, add the action:
Natively - Send Custom Event.Provide the Event name.
Provide the Event data as a JSON object (must be valid JSON). Example:
{
"user_id": "12345",
"screen": "home",
"duration_seconds": 45,
"is_premium_user": true
}
Result:
The event and its custom parameters will be recorded in your Analytics dashboard.

JavaScript SDK
Use the natively.analyticsTrackEvent() method to send the event name and a JavaScript object containing the custom data.
Example:
// 1. Define custom parameters using a Map
const eventData = new Map();
eventData.set('user_id', '12345');
eventData.set('screen', 'home');
eventData.set('duration_seconds', 45);
eventData.set('is_premium_user', true);
// 2. Send the event
natively.analyticsTrackEvent('button_clicked', Object.fromEntries(eventData));How to Test in AppsFlyer
Add the test device to your AppsFlyer account. Follow this guide: here
In the AppsFlyer dashboard, go to Settings > SDK Integration Test > Live events.

Select your app and the test device, then click Continue.

Start the event listener. Launch the app on the test device and trigger the custom event (e.g., click the button associated with the event).

Result:
You will see the custom event and its associated data registered in the AppsFlyer Live Events dashboard.

Last updated
Was this helpful?