Is Unity Analytics a "best effort delivery" service? (Offline / Unreliable Connections)

Wondering if we should expect that some metrics might get lost or dropped in transit?
If so, would you have any recommendations for how we should adjust our numbers?

Also, what happens on the client side when a player doesn't have a connection when a metric post is being made? Is there a timeout duration?

And any functionality for it to automatically try to resend?

Our SDK caches events that are sent if the request fails for any reason(e.g. no internet connection) after it reaches the retry threshold.
Once there’s an internet connection, we resend the cached events.

1 Like

Oh, thats great to know. So we don't need to handle that on our end. Thanks!

@kentunity When you say caches events, is it just in memory or is it stored in a persistent format?

That is, will cached events resend even if the app gets shut down and opened again ?


Yes. Events are stored in a file which Analytics will attempt to flush at a later opportunity.

1 Like


How are custom events sent?

We use custom events to log our onboarding:

Analytics.CustomEvent("OnboardingProgress", new Dictionary<string, object> {{"stage", stage}});

Example: User is shown a popup and we log it as custom event stage 1. If the user click the button we log it as stage 2. Next popup is stage 3, etc. It is sequential so that we can use it in a funnel.

Could you clarify the following.

  • Are they batched?
  • Is there a guaranteed order?
  • Can earlier submitted/cached events be overridden?

We use funnels to see where they drop off. So if intermediary event data is changed then the funnel would give a wrong impression. We experience that sometimes stages disappears. A funnel going stage 1, 2, 3 does not give the same total completion rate as a funnel only checking stage 1, 3. When the start user number are the same for stage 1 i both cases.

HI @Haukien ,

Yes, we batch and send events 30 at a time. Each event is sent with its timestamp so that even if they are sent out of order, which in very rare cases I suppose is potentially possible, our system will recognize/handle them in the order they were originally called. The user attributes fields are the only events that can over write a previous value, other than that there is no way to override a cached event.

You should see the same total completion rate for both funnels if all users sent the 'stage 1', 'stage 2', and 'stage 3' events. The funnels would not show the same total completion rate if it were possible to send the 'stage 3' event before sending the 'stage 2' event as this would only move those users a step in the 'stage 1', 'stage 2' funnel.

Would you mind opening a support ticket here and include the two funnels where you experienced this? This will give me some more information about how to look into this possible issue.


Thanks for the reply. We will do that.

Is there any way I could use Unity Analytics on a private cloud / isolated network?

Hi @edm1606 ,

We have no plans for a privately-hosted Analytics service.

Hey Guys,
So we recently went to Gamescom with our Game and from reading your replies I thought we would get our Events afterwards, but as you can see the Events were not sent afterwards.
The App was closed in between and we afterwards went into WLAN and went into the App, but nothing was sent...
Any Ideas what failed us there?
I am absolutely sure the Events were fired in the first place, tested the code before building onto the tablets and also wrote some events to the log, so this is not a possible Issue.
These were custom events, if that is somewhat important.
Thanks in advance!

I also experienced this. I have started the game multiple times based on the said “cached” retries but am yet to see any stats. It is really irritating as I made a special effort to get the analytics into the game just for the show…

Is there a file or something I can at least look at to process myself?

We have received a few reports of this behavior, I will test here. One way to test if the game is sending events is to use Charles Proxy

This should be working as expected, but it may take some time (8-16 hours) for the events to show in the Dashboard. The cached files would be located in your PersistentDataPath c# - Location of Application.persistentDataPath in a build - Stack Overflow

I confirmed that Unity events are correctly cached when a device is offline and then sent the next time the device is connected to the Internet and the game is launched. I used Charles Proxy to make the determination.