> ## 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

> Send optional in-app events such as onboarding completion, paywall views, and product interactions from your app to PNLight.

`logEvent` sends in-app events to PNLight, similar to sending app events to AppsFlyer. This is optional. Events appear in **Analytics → App Events**, on the project **Events** page, and in customer timelines.

## Event names

Use stable, lowercase event names. Keep names specific enough to understand in reports.

Good examples:

* `onboarding_completed`
* `paywall_viewed`
* `trial_started`

Avoid names that include user-specific values, timestamps, or build numbers.

## Send an event

<CodeGroup>
  ```swift Swift theme={null}
  await PNLightSDK.shared.logEvent("paywall_viewed", eventArgs: [
      "placement": "paywall",
      "source": "onboarding"
  ])
  ```

  ```tsx React Native theme={null}
  import { logEvent } from "@pnlight/sdk-react-native";

  await logEvent("paywall_viewed", {
    placement: "paywall",
    source: "onboarding",
  });
  ```

  ```dart Flutter theme={null}
  await PNLightSDK.logEvent('paywall_viewed', {
    'placement': 'paywall',
    'source': 'onboarding',
  });
  ```
</CodeGroup>

## Event parameters

Use parameters for context that helps you segment or debug the event.

| Parameter   | Example      | Use                                         |
| ----------- | ------------ | ------------------------------------------- |
| `placement` | `paywall`    | Connect UI actions to Remote UI placements. |
| `source`    | `onboarding` | Record where the event happened.            |

<Tip>
  Keep event payloads small. Use event parameters for reporting context, not as a replacement for your app database.
</Tip>

## Review events in the dashboard

Open **Analytics → App Events** to chart event volume over time, compare event names, and inspect recent event samples. Open **Events** when you need raw delivery status, payloads, or cross-user debugging.
