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

User session Query vs. Custom chart

JhonKenneth
Contributor

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

 

7 REPLIES 7

rastislav_danis
DynaMight Pro
DynaMight Pro

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

Alanata a.s.

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"

Alanata a.s.

rastislav_danis
DynaMight Pro
DynaMight Pro

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

Alanata a.s.

JhonKenneth
Contributor

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.

Alanata a.s.

Anish
Observer

@JhonKenneth 

Even I am facing same issue. Were you able to find any solution?

Thanks,
Anish

Featured Posts