- Home /
Question by
mkg2w · Feb 16, 2018 at 03:47 PM ·
eventsunity analytics
how do i send additional data with a standard event
We're using Google's Firebase and Google Analytics in our games, and I was comparing Standard events .
Is there any way to send additional data along with a standard event? For e.g., how could we send the user's coin balance and health, along with each level_complete event ?
Comment
Answer by ap-unity · Jul 30, 2018 at 11:37 PM
All of the Standard Event methods have an optional Dictionary parameter that allows for additional data to be sent with the event. Here's an example from the Standard Events documentation:
public static void ReportScreenVisit(string screenName, string currentScreenName)
{
AnalyticsEvent.ScreenVisit(screenName, new Dictionary<string, object>
{
{ "from_screen", currentScreenName }
});
}