JavaScript Bridge
Logging Meta Events
Send analytics-safe custom events from the website to the native Meta App Events SDK.
Before you start
- Meta SDK module enabled with App ID
- An approved event and data policy
Configure and verify
Define the event
Choose a stable Meta-compatible event name and a small parameter object.
Log through the helper
Call webtoapp.logMetaEvent(name, parameters).
Observe the response
Listen for webtoapp:meta-event or generic onmessage.
Verify in Meta tools
Use Events Manager test events and confirm the correct app receives data.
Example
webtoapp.logMetaEvent("order_placed", {
order_amount: 117.5,
currency: "USD"
});Privacy
Test before release
- Event name is stable
- Data policy permits every parameter
- Test event arrives
- Failures do not block the page