docs.unity3d.com
    Show / Hide Table of Contents

    Class Events

    Inheritance
    Object
    Events
    Namespace: Unity.Services.Analytics
    Syntax
    public static class Events : object

    Fields

    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 PrivacyUrl
    Field 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.

    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023