Search Unity

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

Discussion in 'Unity Analytics' started by michael_voltage, Mar 16, 2015.

  1. michael_voltage

    michael_voltage

    Joined:
    Feb 27, 2015
    Posts:
    30
    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?
     
  2. kentunity

    kentunity

    Unity Technologies

    Joined:
    Sep 16, 2014
    Posts:
    55
    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.
     
    SV_Janjo likes this.
  3. michael_voltage

    michael_voltage

    Joined:
    Feb 27, 2015
    Posts:
    30
    Oh, thats great to know. So we don't need to handle that on our end. Thanks!
     
  4. Sir-Thorgeir

    Sir-Thorgeir

    Joined:
    Jan 17, 2013
    Posts:
    16
    @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 ?

    Cheers
    Thorgeir
     
  5. marc_tanenbaum

    marc_tanenbaum

    Unity Technologies

    Joined:
    Oct 22, 2014
    Posts:
    637
    Yes. Events are stored in a file which Analytics will attempt to flush at a later opportunity.
     
    jacobgmartin likes this.
  6. Haukien

    Haukien

    Joined:
    Aug 20, 2014
    Posts:
    12
    Hi,

    How are custom events sent?

    We use custom events to log our onboarding:

    Code (CSharp):
    1. Analytics.CustomEvent("OnboardingProgress", new Dictionary<string, object> {{"stage", stage}});
    2.  
    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.
    1. Are they batched?
    2. Is there a guaranteed order?
    3. 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.
     
  7. mpinol

    mpinol

    Joined:
    Jul 29, 2015
    Posts:
    317
    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.
     
  8. Haukien

    Haukien

    Joined:
    Aug 20, 2014
    Posts:
    12
    Hi,

    Thanks for the reply. We will do that.
     
  9. edm1606

    edm1606

    Joined:
    Oct 7, 2016
    Posts:
    3
    Is there any way I could use Unity Analytics on a private cloud / isolated network?
     
  10. ap-unity

    ap-unity

    Unity Technologies

    Joined:
    Aug 3, 2016
    Posts:
    1,519
    Hi @edm1606,

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

    JonasBlumer

    Joined:
    Jan 4, 2017
    Posts:
    1
    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!
    analytics_gamescom.PNG
     
  12. Salvation-Au

    Salvation-Au

    Joined:
    Jan 17, 2016
    Posts:
    13
    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?
     
  13. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
  14. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
  15. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446