> ## Documentation Index
> Fetch the complete documentation index at: https://moengage.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Tracking Events

> Track custom user events and their properties in your Unity app using the MoEngage TrackEvent API.

<Info>
  SDK adheres to the MoEngage FUP policies. For more information, refer to the [Fair Usage Policy](https://www.moengage.com/docs/user-guide/data/key-concepts/fair-usage-policy-fup).
</Info>

Tracking events is how you record any actions your users perform, along with any properties that describe the action. Every trackEvent call records a single user action. We recommend that you make your event names human-readable so that everyone on your team can know what they mean instantly.

Every **TrackEvent()** call expects 2 parameters, event name and **Properties** instance which represent additional event attributes about the event. Add all the additional information which you think would be useful for segmentation while creating campaigns. For eg: the following example shows an example of tracking an event with all the possible data types.

<CodeGroup>
  ```c# c# theme={null}
  // Create Properties instance with all the event attributes info
  Properties properties = new Properties()
                .AddBoolean("booleanAttr", true)
                .AddDouble("doubleAttr", 12.34)
                .AddInteger("intAttr", 123)
                .AddLocation("locationAttr", new GeoLocation(12.21, 13.42))
                .AddISODateTime("dateAttr", "2019-01-02T08:26:21.170Z")
                .AddString("stringAttr", "test String");

  // Track Event to track the Event
  MoEngageClient.TrackEvent("UnityEvent", properties);
  ```
</CodeGroup>

<Warning>
  Event names should not contain any special characters other than "\_". It can contain just spaces and an underscore.
</Warning>

# Analytics

MoEngage SDK has started tracking user sessions and application traffic sources.
To learn more about how user session and application traffic source tracking works, refer to the following docs:

*  [Session and Source Analysis](https://www.moengage.com/docs/user-guide/analyze/analytics/session-and-source/session-and-source-analysis) 
*  [Advanced Session and Source Analysis](https://www.moengage.com/docs/user-guide/analyze/analytics/session-and-source/advanced-session-and-source-analysis)

With user session tracking we have introduced the flexibility to selectively mark events as non-interactive.

## What is a non-interactive event?

Events that do not affect the session calculation in anyways are called non-interactive events. Non-interactive events have the below properties

* Do not start a new session.
* Do not extend the session.
* Do not have information related to a user session.

## How to mark an event as non-interactive?

To mark an event as a non-interactive call **SetNonInteractiveEvent()** for **Properties** instance as shown below:

<CodeGroup>
  ```c# c# theme={null}
  // Create Properties instance with SetNonInteractive()
  Properties properties = new Properties()
                .AddBoolean("booleanAttr", true)
                .AddString("stringAttr", "test String")
                .SetNonInteractive();

  // Track Event to track the Event
  MoEngageClient.TrackEvent("NonInteractive Event", properties);
  ```
</CodeGroup>
