Logging AppsFlyer Events

Last updated: May 22, 2026

The AppsFlyer bridge lets your website log custom in-app events directly to AppsFlyer from inside the app. This is how you track meaningful actions — purchases, sign-ups, content views — that happen on your website when it is running inside the app.

Logging an Event

javascript
appilix.postMessage(JSON.stringify({
    type: "appsflyer_log_event",
    props: {
        name: "order_placed",
        parameters: {
            order_amount: 49.99,
            currency: "USD",
            category: "electronics"
        }
    }
}));

Parameters

ParameterDescription
nameThe event name as it should appear in your AppsFlyer dashboard
parametersAn object of additional data about the event

Data Privacy

AppsFlyer follows strict data protection policies. When populating the parameters object:

  • Do not include personal information — no email addresses, names, phone numbers, or government IDs
  • Do include non-personal data relevant to the event — order amounts, product categories, country codes, or anonymized IDs

This keeps your implementation compliant with GDPR and AppsFlyer's data privacy requirements.

Common Event Examples

Track a completed purchase:

javascript
appilix.postMessage(JSON.stringify({
    type: "appsflyer_log_event",
    props: {
        name: "purchase",
        parameters: {
            revenue: 29.99,
            currency: "USD",
            content_type: "subscription"
        }
    }
}));

Track a user sign-up:

javascript
appilix.postMessage(JSON.stringify({
    type: "appsflyer_log_event",
    props: {
        name: "complete_registration",
        parameters: {
            registration_method: "email"
        }
    }
}));

App installs and opens are tracked automatically by the AppsFlyer SDK — you only need to log additional custom events via the bridge.

For AppsFlyer Dev Key and App ID configuration, see the AppsFlyer article.