Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.pnlight.app/llms.txt

Use this file to discover all available pages before exploring further.

Events let you track app actions that matter for analysis, troubleshooting, and attribution review.

Event names

Use stable, lowercase event names. Keep names specific enough to understand in reports. Good examples:
  • onboarding_completed
  • paywall_viewed
  • purchase_completed
  • trial_started
Avoid names that include user-specific values, timestamps, or build numbers.

Send an event

await PNLightSDK.shared.logEvent("purchase_completed", eventArgs: [
    "product_id": "premium_subscription",
    "amount": 9.99,
    "currency": "USD"
])

Event parameters

Use parameters for context that helps you segment or debug the event.
ParameterExampleUse
product_idpremium_subscriptionConnect purchase events to products.
placementpaywallConnect UI actions to server-driven UI placements.
amount9.99Record monetary values.
currencyUSDInterpret monetary values correctly.
Keep event payloads small. Use event parameters for reporting context, not as a replacement for your app database.