docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class EventRequest

    An event representing something happening in your game. This schema describes the default top-level fields but most events will be accepted.

    Inheritance
    object
    EventRequest
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Unity.Services.Apis.Analytics
    Assembly: solution.dll
    Syntax
    [Preserve]
    public class EventRequest

    Constructors

    EventRequest(string, string, string, string, string, string, string, int, object)

    Initializes a new instance of the EventRequest class.

    Declaration
    [Preserve]
    public EventRequest(string eventName = null, string userID = null, string unityInstallationID = null, string unityPlayerID = null, string sessionID = null, string eventUUID = null, string eventTimestamp = null, int eventVersion = 0, object eventParams = null)
    Parameters
    Type Name Description
    string eventName

    The name of the event..

    string userID

    A unique string that identifies the player and is consistent across their subsequent play sessions. (required).

    string unityInstallationID

    The installation ID is provided by the Unity package and used internally by Unity services. It can be safely omitted. The primary use case is identifying where multiple distinct users share a device. .

    string unityPlayerID

    The authenticated playerID, provided by the Unity authentication service. This can be useful to link analytics data to player accounts if you're using other Unity services (such as Cloud Save). If you're not using the Unity authentication service, this field should be omitted. .

    string sessionID

    A unique string value that’s persisted for the duration of each player gameplay session and regenerated with each new gameplay session. The sessionID should be sent with every event the player triggers in their session. There might be occasions when you want to send events containing valuable player information outside a player session and don’t have access to a sessionID. These are called GHOST events and you should omit the sessionID parameter and value on these events to ensure that they're not included in any player session calculations. .

    string eventUUID

    Adding eventUUID to an event will prevent the event being inserted twice within a 24 hour period. This may happen when e.g. a network time-out occurs, even if the event has already been processed by Unity Analytics. Should be unique per event. (required).

    string eventTimestamp

    If eventTimestamp is missing, the server will infer the timestamp based on the time the event was received. The date format should be as follows: yyyy-MM-dd HH:mm:ss.SSS ±[hh]:[mm] where ±[hh]:[mm] can be included to indicate offset from UTC. .

    int eventVersion

    The version of the standard event only. .

    object eventParams

    A JSON object containing information about the event that conforms to the event schema (Event Parameters)..

    Properties

    EventName

    The name of the event.

    Declaration
    [Preserve]
    public string EventName { get; set; }
    Property Value
    Type Description
    string

    The name of the event.

    EventParams

    A JSON object containing information about the event that conforms to the event schema (Event Parameters).

    Declaration
    [Preserve]
    public object EventParams { get; set; }
    Property Value
    Type Description
    object

    A JSON object containing information about the event that conforms to the event schema (Event Parameters).

    EventTimestamp

    If eventTimestamp is missing, the server will infer the timestamp based on the time the event was received. The date format should be as follows: yyyy-MM-dd HH:mm:ss.SSS ±[hh]:[mm] where ±[hh]:[mm] can be included to indicate offset from UTC.

    Declaration
    [Preserve]
    public string EventTimestamp { get; set; }
    Property Value
    Type Description
    string

    If eventTimestamp is missing, the server will infer the timestamp based on the time the event was received. The date format should be as follows: yyyy-MM-dd HH:mm:ss.SSS ±[hh]:[mm] where ±[hh]:[mm] can be included to indicate offset from UTC.

    EventUUID

    Adding eventUUID to an event will prevent the event being inserted twice within a 24 hour period. This may happen when e.g. a network time-out occurs, even if the event has already been processed by Unity Analytics. Should be unique per event.

    Declaration
    [Preserve]
    public string EventUUID { get; set; }
    Property Value
    Type Description
    string

    Adding eventUUID to an event will prevent the event being inserted twice within a 24 hour period. This may happen when e.g. a network time-out occurs, even if the event has already been processed by Unity Analytics. Should be unique per event.

    EventVersion

    The version of the standard event only.

    Declaration
    [Preserve]
    public int EventVersion { get; set; }
    Property Value
    Type Description
    int

    The version of the standard event only.

    SessionID

    A unique string value that’s persisted for the duration of each player gameplay session and regenerated with each new gameplay session. The sessionID should be sent with every event the player triggers in their session. There might be occasions when you want to send events containing valuable player information outside a player session and don’t have access to a sessionID. These are called GHOST events and you should omit the sessionID parameter and value on these events to ensure that they're not included in any player session calculations.

    Declaration
    [Preserve]
    public string SessionID { get; set; }
    Property Value
    Type Description
    string

    A unique string value that’s persisted for the duration of each player gameplay session and regenerated with each new gameplay session. The sessionID should be sent with every event the player triggers in their session. There might be occasions when you want to send events containing valuable player information outside a player session and don’t have access to a sessionID. These are called GHOST events and you should omit the sessionID parameter and value on these events to ensure that they're not included in any player session calculations.

    UnityInstallationID

    The installation ID is provided by the Unity package and used internally by Unity services. It can be safely omitted. The primary use case is identifying where multiple distinct users share a device.

    Declaration
    [Preserve]
    public string UnityInstallationID { get; set; }
    Property Value
    Type Description
    string

    The installation ID is provided by the Unity package and used internally by Unity services. It can be safely omitted. The primary use case is identifying where multiple distinct users share a device.

    UnityPlayerID

    The authenticated playerID, provided by the Unity authentication service. This can be useful to link analytics data to player accounts if you're using other Unity services (such as Cloud Save). If you're not using the Unity authentication service, this field should be omitted.

    Declaration
    [Preserve]
    public string UnityPlayerID { get; set; }
    Property Value
    Type Description
    string

    The authenticated playerID, provided by the Unity authentication service. This can be useful to link analytics data to player accounts if you're using other Unity services (such as Cloud Save). If you're not using the Unity authentication service, this field should be omitted.

    UserID

    A unique string that identifies the player and is consistent across their subsequent play sessions.

    Declaration
    [Preserve]
    public string UserID { get; set; }
    Property Value
    Type Description
    string

    A unique string that identifies the player and is consistent across their subsequent play sessions.

    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)