Search Unity

How do I turn off analytics at runtime?

Discussion in 'Unity Analytics' started by sonnywang, May 18, 2015.

  1. sonnywang

    sonnywang

    Joined:
    Mar 26, 2014
    Posts:
    11
    if my user (android) wants to stop collecting data, is it possible to turn the analytics off?
     
  2. angeloferro

    angeloferro

    Moderator

    Joined:
    Sep 12, 2014
    Posts:
    105
    Hi @sonnywang - thanks for the question. Currently there's no way to turn off analytics for specific users.
     
  3. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,906
    I don't know if this would work, but couldn't you just attach the SDK analytics script to an object if they accept, and don't if they decline, that way it only starts the SDK (and thus data collection) if they accept?
     
  4. sonnywang

    sonnywang

    Joined:
    Mar 26, 2014
    Posts:
    11
    (my understanding is that) but once the app runs, the analytics engine is intialized and runs in memory. So unless the user terminates the app (not just suspend it in background when pressing Home key), it won't stop collecting and sending data. So user needs to terminate and restart game if they choose to turn off the analytics engine during this game session.
     
  5. QFSW

    QFSW

    Joined:
    Mar 24, 2015
    Posts:
    2,906
    Yeah what you are saying is right, the way work around I was suggesting was more of a prompt when they first run it
    If you think about it though, do you think anyone will care if they're analytics settings take effect mid game?