> For the complete documentation index, see [llms.txt](https://kinematicsoup.gitbook.io/reactor/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kinematicsoup.gitbook.io/reactor/api-reference/ks.unity.editor/ks.unity.editor.ksanalyticsevent.md).

# Class ksAnalyticsEvent

Namespace: [KS.Unity.Editor](/reactor/api-reference/ks.unity.editor.md)\
Assembly: KSUnity-Editor.dll

Contains data for an analytics event.

```csharp
public class ksAnalyticsEvent
```

#### Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) ← [ksAnalyticsEvent](/reactor/api-reference/ks.unity.editor/ks.unity.editor.ksanalyticsevent.md)

#### Derived

[ksAnalyticsDurationEvent](/reactor/api-reference/ks.unity.editor/ks.unity.editor.ksanalyticsdurationevent.md)

#### Inherited Members

[object.Equals(object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals\(system-object\)), [object.Equals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals\(system-object-system-object\)), [object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode), [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype), [object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone), [object.ReferenceEquals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals), [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Constructors

### ksAnalyticsEvent(string, string) <a href="#ks_unity_editor_ksanalyticsevent__ctor_system_string_system_string" id="ks_unity_editor_ksanalyticsevent__ctor_system_string_system_string"></a>

Constructor

```csharp
public ksAnalyticsEvent(string name, string category = null)
```

#### Parameters

`name` [string](https://learn.microsoft.com/dotnet/api/system.string)

Event name

`category` [string](https://learn.microsoft.com/dotnet/api/system.string)

Event category

## Properties

### Category <a href="#ks_unity_editor_ksanalyticsevent_category" id="ks_unity_editor_ksanalyticsevent_category"></a>

Event category. May be null.

```csharp
public string Category { get; }
```

#### Property Value

[string](https://learn.microsoft.com/dotnet/api/system.string)

### Name <a href="#ks_unity_editor_ksanalyticsevent_name" id="ks_unity_editor_ksanalyticsevent_name"></a>

Event name. Identifies the type of event.

```csharp
public string Name { get; }
```

#### Property Value

[string](https://learn.microsoft.com/dotnet/api/system.string)

## Methods

### WriteProperties(ksJSON) <a href="#ks_unity_editor_ksanalyticsevent_writeproperties_ks_reactor_ksjson" id="ks_unity_editor_ksanalyticsevent_writeproperties_ks_reactor_ksjson"></a>

Derived classes can implement this to write event-specific properties to a json object. The default implementation does nothing.

```csharp
public virtual void WriteProperties(ksJSON properties)
```

#### Parameters

`properties` [ksJSON](/reactor/api-reference/ks.reactor/ks.reactor.ksjson.md)

Json object to write event-specific properties to.
