end level analytics

mail@pastecode.io avatar
unknown
csharp
4 months ago
729 B
3
Indexable
        Dictionary<string, object> eventParams = new Dictionary<string, object>();
        eventParams.Add("Level_num", level);
        eventParams.Add("playerShots", playerShots);
        eventParams.Add("scorePlayer", scorePlayer);
        eventParams.Add("enemyShots", enemyShots);
        eventParams.Add("scoreEnemy", scoreEnemy);

        TinySauce.TrackCustomEvent("custom_level_end", eventParams);


        Dictionary<string, string> stringParams = eventParams.ToDictionary(
            kvp => kvp.Key,
            kvp => kvp.Value.ToString()
        );

#if UNITY_IOS
        Smartlook.TrackCustomEvent($"level_end_{level}");
#endif

        ByteBrew.NewCustomEvent("custom_level_end", stringParams);
Leave a Comment