The discussion revolves around the visibility and usage of Discourse mobile apps on the official website. StefanoCecere pointed out that the apps are hard to find on the website and suggested adding a link to the footer. pmusaraj agreed and assigned the task to improve the visibility of the mobile apps.
Regarding tracking the usage of mobile apps, pmusaraj provided a query using Data Explorer to get the list of authenticated users using the mobile app. However, NiceOldGuy noted that the query seems to be missing users who are using Discourse Hub on Android. pmusaraj explained that the query only works for iOS and promised to provide a separate query for Android.
NiceOldGuy requested a query to track the usage of iOS Discourse Hub, iOS Discourse PWA, Android Discourse Hub, and Android PWA.
Eventually, pmusaraj updated the footer of the website to include links to the mobile apps and created a landing page: https://discourse.org/app. StefanoCecere suggested also linking to the mobile apps from the features page.
We don’t have a report yet, but you can get this info using Data Explorer. This query will give you a list of authenticated users using the mobile app:
-- [params]
-- date :start_date = 2024-11-30
-- date :end_date = 2024-12-26
WITH hub_visits AS (
SELECT
user_id,
MIN(created_at) as first_visit,
MAX(created_at) as last_visit,
COUNT(*) as total_visits
FROM user_auth_token_logs
WHERE user_agent LIKE '%DiscourseHub%'
AND created_at BETWEEN :start_date AND :end_date
GROUP BY user_id
)
SELECT
hv.user_id,
u.username,
hv.first_visit,
hv.last_visit,
hv.total_visits
FROM hub_visits hv
JOIN users u ON u.id = hv.user_id
ORDER BY hv.last_visit DESC
On Android, Hub launches either the default browser or the PWA. So these stars are for iOS only. We can get Android app user stats differently though, I will take a look and post a separate query shortly.
PWA visit data collection needs to go a different route as well.
Thanks @pmusaraj! I’d love a query that would let me see:
iOS Discourse Hub
iOS Discourse PWA
Android Discourse Hub
Android PWA
We’ve just published a how-to on the forum showing members how to set up any of those four methods. Really like to be able to track change in usage! Thanks!