Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat
Analytics how to differentiate users/devices ? - Gideros Forum

Analytics how to differentiate users/devices ?

YanYan Member
edited March 1 in General questions
Any analytics assumes you need to differentiate users by some unique ID, so we have some two basics options:

1) Take device unique ID per install - pros: no need user ask to login Gaming, cons: different ids if user delete app and installed again (not so evil as seems)

2) Take User ID - pros: reaaly same user between installs/delete, cons: need different implements for Ios\android, additional user harrasement (really eveil, one of my game has a huge mass of negative because of needing to make an accont (not google play))

So the question how to take unique ID ???

I found a solution in this thread - forum.giderosmobile.com/discussion/573/identifying-users/p1, is this a really best solution ?

Some additional info that might prooves this only way solution https://pocketmagic.net/android-unique-device-id/#.Ucl6qfnTrD
function createID()
  local lang                = application:getLanguage()
  local device              = application:getDeviceInfo()
  local accel_present       = Accelerometer.isAvailable()
  local gyroscope_present   = Gyroscope.isAvailable()
  local geolocation_present = Geolocation.isAvailable()
  local screen_density      = application:getScreenDensity()
  if screen_density == nil then
    screen_density = 0
  end
  local id = string.format("%08x%03x%04x%04x%03x%x%x%x%x%x%x%x", 
                           os.time(), 
                           application:getFps(), 
                           application:getDeviceWidth(), 
                           application:getDeviceHeight(),
                           screen_density,
                           string.byte(lang, 1), 
                           string.byte(lang, 2),
                           string.byte(device, 1), 
                           string.byte(device, 2),
                           accel_present and 1 or 0,
                           gyroscope_present and 1 or 0,
                           geolocation_present and 1 or 0)
 
  return(id)
end
vk.com/yan_alex

Comments

  • hgy29hgy29 Maintainer
    Accepted Answer
    With GDPR and other related stuff, it is more and more difficult to directly identify a user or a device. I use the following approach in my apps: I generate a UUID (based on current time and random value), and save it to a file in '|D|' for reuse on next launches of the app.

    PRO: it is simple and cross platform as long as you can store files (will fail on HTML5 private mode).

    CONS:
    - id is lost if user reinstall the app
    - id is different per device
    - there is a (unlikely) risk of collision during generation
  • YanYan Member
    hgy29 said:

    With GDPR and other related stuff, it is more and more difficult to directly identify a user or a device. I use the following approach in my apps: I generate a UUID (based on current time and random value), and save it to a file in '|D|' for reuse on next launches of the app.

    PRO: it is simple and cross platform as long as you can store files (will fail on HTML5 private mode).

    CONS:
    - id is lost if user reinstall the app
    - id is different per device
    - there is a (unlikely) risk of collision during generation

    Thanks for help! Ill try to do the same, as I see there are no best options.
    vk.com/yan_alex
Sign In or Register to comment.