Class Events
Namespace: Unity.Services.Analytics
Syntax
public static class Events : objectFields
PrivacyUrl
This is the URL for the Unity Analytics privacy policy. This policy page should be presented to the user in a platform-appropriate way along with the ability to opt out of data collection.
Declaration
public static readonly string PrivacyUrlField Value
| Type | Description | 
|---|---|
| String | 
Properties
Buffer
Declaration
public static IBuffer Buffer { get; }Property Value
| Type | Description | 
|---|---|
| IBuffer | 
Methods
AdImpression(Events.AdImpressionArgs)
Record an Ad Impression event.
Declaration
public static void AdImpression(Events.AdImpressionArgs args)Parameters
| Type | Name | Description | 
|---|---|---|
| Events.AdImpressionArgs | args | (Required) Helper object to handle arguments. | 
CustomData(String, IDictionary<String, Object>)
Record a custom event. A schema for this event must exist on the dashboard or it will be ignored.
Declaration
public static void CustomData(string eventName, IDictionary<string, object> eventParams)Parameters
| Type | Name | Description | 
|---|---|---|
| String | eventName | |
| IDictionary<String, Object> | eventParams | 
Flush()
Declaration
public static void Flush()OptOut()
Opts the user out of sending analytics. All existing cached events and any subsequent events will be discarded immediately. A final 'forget me' signal will be uploaded which will trigger purge of analytics data for this user from the back-end. If this 'forget me' event cannot be uploaded immediately (e.g. due to network outage), it will be reattempted regularly until successful upload is confirmed. Consent status is stored in PlayerPrefs so that the opted-out status is maintained over app restart. This action cannot be undone.
Declaration
public static void OptOut()Transaction(Events.TransactionParameters)
Record a Transaction event.
Declaration
public static void Transaction(Events.TransactionParameters transactionParameters)Parameters
| Type | Name | Description | 
|---|---|---|
| Events.TransactionParameters | transactionParameters | (Required) Helper object to handle parameters. |