Logging Meta Events
The Meta bridge lets your website log custom events to Meta (Facebook) from inside the app. This feeds your Meta Analytics dashboard with meaningful signals — purchases, registrations, content views — that help you measure campaign performance and optimize for conversions.
Logging an Event
javascript
appilix.postMessage(JSON.stringify({
type: "meta_log_event",
props: {
name: "Purchase",
parameters: {
order_amount: 79.99,
currency: "USD",
category: "clothing"
}
}
}));Parameters
| Parameter | Description |
|---|---|
name | The event name. Use Meta's standard event names where possible (e.g., Purchase, CompleteRegistration, ViewContent) |
parameters | An object of additional data about the event |
Data Privacy
Keep event parameters free of personal information:
- Do not include email addresses, names, phone numbers, or any personally identifiable information
- Do include non-personal metrics — order totals, product categories, country codes, or anonymized values
This keeps your implementation compliant with Meta's data policies and relevant privacy regulations.
Common Event Examples
Track a completed purchase:
javascript
appilix.postMessage(JSON.stringify({
type: "meta_log_event",
props: {
name: "Purchase",
parameters: {
value: 49.99,
currency: "USD"
}
}
}));Track a registration:
javascript
appilix.postMessage(JSON.stringify({
type: "meta_log_event",
props: {
name: "CompleteRegistration",
parameters: {
registration_method: "email"
}
}
}));For Meta App ID and Client Token configuration, see the Meta SDK article.