> 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.ksanalyticsdurationevent.md).

# Class ksAnalyticsDurationEvent

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

Analytics event that uses MixPanel's built-in duration property.

```csharp
public class ksAnalyticsDurationEvent : ksAnalyticsEvent
```

#### Inheritance

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

#### Derived

[ksAnalytics.Events.BuildConfigs](/reactor/api-reference/ks.unity.editor/ks.unity.editor.ksanalytics/ks.unity.editor.ksanalytics.events/ks.unity.editor.ksanalytics.events.buildconfigs.md), [ksAnalytics.Events.BuildServer](/reactor/api-reference/ks.unity.editor/ks.unity.editor.ksanalytics/ks.unity.editor.ksanalytics.events/ks.unity.editor.ksanalytics.events.buildserver.md), [ksAnalytics.Events.Publish](/reactor/api-reference/ks.unity.editor/ks.unity.editor.ksanalytics/ks.unity.editor.ksanalytics.events/ks.unity.editor.ksanalytics.events.publish.md)

#### Inherited Members

[ksAnalyticsEvent.Name](/reactor/api-reference/ks.unity.editor/ks.unity.editor.ksanalyticsevent.md#KS_Unity_Editor_ksAnalyticsEvent_Name), [ksAnalyticsEvent.Category](/reactor/api-reference/ks.unity.editor/ks.unity.editor.ksanalyticsevent.md#KS_Unity_Editor_ksAnalyticsEvent_Category), [ksAnalyticsEvent.WriteProperties(ksJSON)](/reactor/api-reference/ks.unity.editor/ks.unity.editor.ksanalyticsevent.md#KS_Unity_Editor_ksAnalyticsEvent_WriteProperties_KS_Reactor_ksJSON_), [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

### ksAnalyticsDurationEvent(string, int, string) <a href="#ks_unity_editor_ksanalyticsdurationevent__ctor_system_string_system_int32_system_string" id="ks_unity_editor_ksanalyticsdurationevent__ctor_system_string_system_int32_system_string"></a>

Constructor

```csharp
public ksAnalyticsDurationEvent(string name, int duration, string category = null)
```

#### Parameters

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

Event name

`duration` [int](https://learn.microsoft.com/dotnet/api/system.int32)

Event duration in seconds.

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

Event category

## Methods

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

Writes the built-in MixPanel duration property.

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

#### Parameters

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

Json object to write event-specific properties to.
