Showing results for 
Show  only  | Search instead for 
Did you mean: 

User session Query vs. Custom chart


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 IN ('Log in')



Have you tried setting older timeframe (f.e. -2h to -1h) ? USQL provides data only for finished (non live) sessions.

Yes 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')


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.