# Analytics for the Unity Plugin

Track user engagement and app performance with Airship analytics, including custom events, screen tracking, and associated identifiers.

> **Note:** Analytics events are batched and uploaded asynchronously in the background to minimize battery impact. The database size is fixed, so events are safely stored even when offline. Events may not upload immediately and may wait until the next app initialization if the app is closed before the upload completes.


## Custom Events

Track user activities and key conversions with custom events. They require enabling analytics for your app. For detailed information, see the [Custom Events guide](https://www.airship.com/docs/guides/audience/events/custom-events/).

```csharp
CustomEvent customEvent = new CustomEvent();
customEvent.EventName = "event_name";
customEvent.EventValue = 123.45;
customEvent.AddProperty("my_custom_property", "some custom value");
customEvent.AddProperty("is_neat", true);
UAirship.Shared.AddCustomEvent(customEvent);
```


## Associated Identifiers

Associated identifiers (also called custom identifiers) associate an external identifier with a [Channel ID](https://www.airship.com/docs/reference/glossary/#channel_id). They are visible in [Real-Time Data Streaming](https://www.airship.com/docs/reference/glossary/#rtds). We recommend adding any IDs that you may want to be visible in your event stream. You can assign up to 20 associated identifiers to a device. Unlike other identifiers (e.g., tags), you cannot use associated identifiers to target your users.

```csharp
UAirship.Shared.AssociateIdentifier("key", "value");
```


## Screen Tracking

The Airship SDK gives you the ability to track which screens a user views within the application, how long a user stayed on each screen, and also includes the user's previous screen. These events then come through [Real-Time Data Streaming](https://www.airship.com/docs/reference/glossary/#rtds), allowing you to see the path a user took through the application, or trigger actions based on a user visiting a particular area of the application.

```csharp
UAirship.Shared.TrackScreen("MainScreen")
```


