30 Aug 2021
12:12 PM
- last edited on
31 Aug 2022
10:44 AM
by
MaciejNeumann
Hi All,
I'm having difficulty in getting the exact query to get the exact count of user action. E.g (Login count).
Compared it to the available custom chart but it doesn't match.
Custom chart metrics:
Mobile app key user action Action count (by key user action, OS, Apdex category) [mobile, custom] (Sum)
Here is the usql.
SELECT count(*) as [Login] FROM usersession WHERE useraction.application='My App' AND useraction.name IN ('Log in')
Solved! Go to Solution.
Have you tried setting older timeframe (f.e. -2h to -1h) ? USQL provides data only for finished (non live) sessions.
Yes rastislav_danis tried it but it doesn't match. It might be USQL only deals with the non bouncing session? and custom chart catch it all?
you can try to focus on non bounced sessions with condition "where usersession.bounce IS false"
ok now i see, you are counting sessions (count(*) FROM usersession), where your action is present (maybe more than once), try to change it this way to count every action (not session):
SELECT count(*) as [Login] FROM useraction WHERE application='My App' AND name IN ('Log in')
rastislav_danis already tried the query above but still count is not equal. Appreciate the response. 😊
Yes i also found that results are not matching. I'm not 100% sure on how mentioned metric is calculated, so it's hard to compare.