Events Reference

Track user actions and forward them to ad networks for conversion optimization.

Event Types#

AppRefer processes two types of events:

TypeSourceUse Case
SDK eventstrackEvent() in your app codeCustom actions: sign_up, tutorial_complete, level_complete, etc.
RevenueCat webhook eventsRevenueCat server-to-serverAll purchase and subscription lifecycle events (no app code needed)

SDK Event Tracking#

Flutter - Track Event
// Standard event
await AppReferSDK.trackEvent('sign_up');

// Event with revenue
await AppReferSDK.trackEvent('purchase', params: {
  'revenue': '9.99',
  'currency': 'USD',
});

// Custom event
await AppReferSDK.trackEvent('tutorial_complete');

Standard Event Names#

Event NameDescription
installAutomatically tracked on first SDK configure()
sign_upUser creates an account
start_trialUser starts a free trial
subscribeUser subscribes to a plan
purchaseUser makes a purchase
add_to_cartUser adds item to cart
initiate_checkoutUser begins checkout flow
searchUser performs a search
view_contentUser views a product or content page
tutorial_completeUser completes onboarding tutorial
level_completeUser completes a game level

Custom Events

Any string name is supported as an event name. Standard names receive automatic mapping to ad network event types, while custom events are forwarded as-is where the network supports custom events.

Revenue Events#

Include revenue and currency parameters to report revenue to ad networks. Revenue values should be strings representing decimal amounts (e.g., "9.99"). Currency should be a 3-letter ISO 4217 code (e.g., "USD").

Ad Network Event Mapping#

AppRefer EventMeta CAPIGoogle AdsTikTok
installLead(gclid required)Lead
purchasePurchasepurchasePurchase
sign_upCompleteRegistrationsign_upCompleteRegistration
start_trialStartTrialstart_trialStartTrial
qualified_trialStartTrialqualified_trialStartTrial
subscribeSubscribesubscribeSubscribe
add_to_cartAddToCartadd_to_cartAddToCart
view_contentViewContentview_contentViewContent

Event Deduplication#

Each forwarded event includes a unique identifier per network to prevent duplicate conversions. Deduplication is handled automatically — no additional configuration needed.

Advanced Matching#

Call setAdvancedMatching() after user login to enrich forwarded events with hashed PII. This improves ad network match rates by 20-30%.

Flutter - Advanced Matching
AppReferSDK.setAdvancedMatching(
  email: 'user@example.com',
  phone: '+14155551234',
);

All PII is SHA256-hashed on the device before being sent to the server. See the Privacy page for details on data handling.