Skip navigation
Your user global app’s metrics might be muddled by a gotcha!
0:00 / 0:25

Your user global app’s metrics might be muddled by a gotcha!

Google for Developers

@googledevs2.6M followers

Visit on X
48 likesDownloadOriginal post

23,832 views

Your user global app’s metrics might be muddled by a gotcha! Check out this SQL dev challenge about a common tracking issue that affects users worldwide. Tell us where we went wrong and how to fix it in the comments below.

2 Comments

Comments from the original post on X (Twitter)

  • Google for Developers's profile picture

    @googledevs

    Hint: Think about what happens when a user logs in at 11:59 PM in California while your server is in New York. Which day should that login count towards?

    8 likes

  • Ondřej Pařízek's profile picture

    @OndraPariz

    Hi, I think there's a timezone issue here. The query doesn't reflect each user's local time, which can lead to incorrect daily counts. Ideally, we should store the user's timezone and convert both login_time and CURRENT_DATE to that timezone when aggregating login data.