Setting Unity custom dimensions

Before custom dimensions will appear in the dashboard, you need to set them for the first time. Use the following code examples to learn how to set custom dimensions for Unity.

Localytics.OnLocalyticsSessionWillOpen += OnLocalyticsSessionWillOpenHandler;
Localytics.RegisterForAnalyticsEvents(); // can be optionally turned on/off

    void OnLocalyticsSessionWillOpenHandler(bool isFirst, bool isUpgrade, bool isResume)
    {
        if (isFirst)
        {
            Localytics.SetCustomDimension(0, "Paid"); // App Type - Unknown / Trial / Paid
            Localytics.SetCustomDimension(1, "Gold"); // User Status - Gold / Platinum / Diamond
        }
        if (isUpgrade)
        {
            Localytics.SetCustomDimension(2, "On"); // Notifications - On / Off
        }
    }