# RegisterEventWithLimit

> This API is used for registering an Editor Analytics event. Note: This API is for internal use only and is likely change in the future. Do not use in user code.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor](/engine/6000.0/script-reference/unityeditor.md)
* **Assembly:** UnityEditor

## RegisterEventWithLimit(string, int, int, string)

This API is used for registering an Editor Analytics event. Note: This API is for internal use only and is likely change in the future. Do not use in user code.

> **Warning:**
>
> **Deprecated.** Editor Analytics APIs have changed significantly, please see: [https://docs.editor-data.unity3d.com/Contribute/EditorAnalytics/cs\_guide/](https://docs.editor-data.unity3d.com/Contribute/EditorAnalytics/cs_guide/)

```csharp
public static AnalyticsResult RegisterEventWithLimit(string eventName, int maxEventPerHour, int maxItems, string vendorKey)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): Name of the event.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Hourly limit for this event name.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Maximum number of items in this event.**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): Vendor key name.

### Returns

| Type            | Description |
| --------------- | ----------- |
| AnalyticsResult |             |

## RegisterEventWithLimit(string, int, int, string, int)

This API is used for registering an Editor Analytics event. Note: This API is for internal use only and is likely change in the future. Do not use in user code.

> **Warning:**
>
> **Deprecated.** Editor Analytics APIs have changed significantly, please see: [https://docs.editor-data.unity3d.com/Contribute/EditorAnalytics/cs\_guide/](https://docs.editor-data.unity3d.com/Contribute/EditorAnalytics/cs_guide/)

```csharp
public static AnalyticsResult RegisterEventWithLimit(string eventName, int maxEventPerHour, int maxItems, string vendorKey, int ver)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): Name of the event.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Hourly limit for this event name.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Maximum number of items in this event.**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): Vendor key name.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): Event version number.

### Returns

| Type            | Description |
| --------------- | ----------- |
| AnalyticsResult |             |
