snowplow / snowplow-android-tracker

Snowplow event tracker for Android. Add analytics to your Android apps and games
http://snowplowanalytics.com
Apache License 2.0
109 stars 63 forks source link

Android InstallReferrerDetails: install_begin_timestamp & referrer_click_timestamp always wrong and install_begin_timestamp often missing #687

Closed davidher-mann closed 3 months ago

davidher-mann commented 5 months ago

We came across that install_begin_timestamp and referrer_click_timestamp are always wrong, since the Snowplow SDK assumes that the Google Play installreferrer API response is in milliseconds but it is actually in seconds since epoch.

As you can see in this screenshot, I was able to proof this. I corrected the install_begin_timestamp through multiplying it by 1000 and got the correct timestamp.

timestamp issue proof from BigQuery

Source from the official API documentation regarding the response format

Related file: https://github.com/snowplow/snowplow-android-tracker/blame/07536ea8db236e8f6efd74b07f3af901a136846e/snowplow-tracker/src/main/java/com/snowplowanalytics/core/tracker/InstallReferrerDetails.kt#L70-L71

Further more, the install_begin_timestamp is missing for about 30% of installs (sample size ~145k installs on Android 8 and higher).We are running InstallReferrer package to v2.2 and Snowplow Tracker versions 5+

missing install_begin_timestamp
mscwilson commented 4 months ago

thanks for the report 😵

mscwilson commented 4 months ago

@davidher-mann is it just the install_begin_timestamp missing in those 30% of installs, or the referrer_click_timestamp as well? Do you know anything more about the events where it's missing, maybe about device?