I wasn’t able to find anything in the documentation about how the events are manages in the SDK, but as far as I understood, the events are automatically cached and when the app gets closed, they will be automatically flushed. if this is the case, then why would I need to use “AnalyticsService.Instance.Flush()” in the first place?
2a. Does this works also in the Unity Editor, I mean, every time I hit the “stop” button the events will be automatically send to the server?
in case I want to send an event with zero parameters, should I pass an empty dictionary to the
AnalyticsService.Instance.CustomData(eventName, param) method
I’m not entirely sure how you got to that link? That’s not what I linked, please try again here: Track Events
The documentation which I linked explains in more detail, but yes, standard events get sent when the app is quit.
Yes
I’m not entirely sure what you mean? Why would you want to send a custom event with 0 parameters?
Take a look at best practices on the same link, I originally linked: Track Events
I’ve attached the image that contains the broken link in the documentation in case you might want to fix it.
Assuming I’ve create en event called “player_did_click_double_coin_btn” to register when the user did click the button to double the coins, now this event has no custom parameter like level number, number or coins etc.
So to launch the event I do this:
string eventName = "player_did_click_double_coin_btn";
Dictionary<string, object> body = new Dictionary<string, object>()
{
};
AnalyticsService.Instance.CustomData(eventName, body);
Where the body of the custom data is an empty dictionary. Looking at the documentation, I’ve only found examples where events have custom parameters associated. So, is it correct what I’m doing?
Thanks