Interface IAnalyticsApi
Represents a collection of functions to interact with the API endpoints
Namespace: Unity.Services.Apis.Analytics
Assembly: Unity.Services.Apis.dll
Syntax
public interface IAnalyticsApi : IApiAccessor
Methods
GenerateUuid(CancellationToken)
Generate a random unique userID
Declaration
ApiOperation<UuidResponse> GenerateUuid(CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |
SubmitEvent(string, string, string, string, SubmitEventRequest, CancellationToken)
Submit event(s)
Declaration
ApiOperation SubmitEvent(string projectId, string environmentName, string PIPL_CONSENT = null, string PIPL_EXPORT = null, SubmitEventRequest submitEventRequest = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | projectId | ID for Unity project |
string | environmentName | Name of an environment. To get the Environment name, go to the project Dashboard > Projects > Project Settings > Environments. |
string | PIPL_CONSENT | The presence of this header will indicate the player has granted consent to data collection. Players who do not consent should not have this header set on requests. The value of the header does not matter. This header is only required if the request originates in China. (optional) |
string | PIPL_EXPORT | The presence of this header will indicate the player has granted consent to their data being sent out of China for processing. Players who do not consent should not have this header set on requests. The value of the header does not matter. This header is only required if the request originates in China. (optional) |
Submit |
submitEventRequest | (optional) |
Cancellation |
cancellationToken | Cancellation Token to cancel the request. |
Returns
Type | Description |
---|---|
Api |
The operation |