Analytics
The Analytics screen for agents and landlords, covering stat cards, closings volume, and the weekly or monthly views versus inquiries chart.
Analytics is a read-only screen that summarises how an agent's or landlord's listings are doing. Everything on it comes from two dashboard endpoints; nothing can be edited here.
Where it lives
| Screen | Route | File | Who sees it |
|---|---|---|---|
| Analytics | /(tabs)/analytics (pushed as /analytics) | app/(tabs)/analytics.tsx | Anyone in the (tabs) navigator, opened from Profile |
| Profile, Business section | /(tabs)/profile | app/(tabs)/profile/index.tsx | Entry point: Performance row |
Supporting code: services/dashboard/dashboard-api.ts (RTK Query slice dashboardApi, tags DashboardStats and DashboardPerformance).
Before you start
- Signed in with a role that lands in
(tabs).analyticsis registered withhref: null, so it has no tab bar icon. Open it from Profile, then Business, then Performance ("Views, inquiries and closings"). - The Profile row is labelled Performance, while the screen title is Analytics.
- The numbers cover every property where the signed-in user is the
landlordIdor theagentId. - No device permissions are needed.
Flow
Open the screen
- From Profile, tap Performance. The screen shows the title Analytics and "Track your listings and deal performance.". There is no back button in the header; the tab bar stays visible, so the user leaves by tapping a tab or using the system back gesture.
- Two requests fire:
GET /api/v1/dashboard/statsandGET /api/v1/dashboard/performance?view=weekly. Until both have answered once, a centred spinner replaces the content. - The stats response is shared with the dashboard home screen through the same RTK Query cache entry, so the cards often render instantly.
Stat cards
Four cards are laid out in a two-column grid. Each shows an icon, the number and a label.
| Card label | Field | How the backend counts it |
|---|---|---|
| Total Listings | totalListings | All of the user's properties, any status |
| Active Listings | activeListings | Properties with status listed |
| Pending Requests | pendingRequests | Inspections on the user's properties with status scheduled or pending_review |
| Closings | successfulClosings | Properties with status rented or sold |
A missing value is shown as 0.
Closings Volume banner
Below the cards, a banner labelled Closings Volume shows closingsVolume with a naira sign and en-NG thousands separators. The backend computes it as the sum of rent price plus sale price across the user's rented and sold properties. The banner is only rendered once stats have loaded.
Closings Volume is a listing price total, not money received
The figure adds up the listed prices of closed properties. It is not derived from payments or escrow. For money actually earned, see Earnings and payouts.
Performance chart
- The card is titled Performance with the subtitle "Views vs Inquiries" and a two-option toggle: Weekly (default) and Monthly.
- A legend shows Views (blue) and Inquiries (green).
- The chart is a simple bar chart drawn with plain views (no chart library). Each point has two bars and a label underneath. Bars are scaled against the largest value in the set and have a minimum height of 4 points, so a zero still draws a sliver. The chart scrolls horizontally when it is wider than the card.
- Weekly requests
GET /api/v1/dashboard/performance?view=weeklyand returns seven points labelledMONtoSUNfor the current week. - Monthly requests
GET /api/v1/dashboard/performance?view=monthlyand returns twelve points labelledJANtoDECfor the current calendar year. - For each point:
viewsis the number of recorded views on the user's properties in that period.inquiriesis the number of inspection requests created for the user's properties in that period.
- Each view mode is cached separately. Switching back to a mode that was already loaded is instant.
Smart Summary
The last card, Smart Summary, repeats two numbers from the stats response as sentences:
- Listings This Month: "n new listings added this month." (
listingsThisMonth, properties created since the first day of the current month). - Deal Pipeline: "n pending requests across your active listings." (
pendingRequests).
Smart Summary is not generated
Despite the name and the sparkle icon, the text is two fixed templates filled with numbers from GET /api/v1/dashboard/stats. No AI or extra endpoint is involved.
Refresh
Pull down to refetch both the stats and the current performance view. The refresh spinner follows the stats request only.
States and edge cases
| Situation | What the user sees |
|---|---|
| First load | Centred spinner under the header until both requests have answered |
| Stats request fails | No error message. All four cards show 0, the Closings Volume banner is hidden and Smart Summary shows 0 |
| Performance request fails or returns nothing | "No performance data available." inside the chart card |
| Switching Weekly and Monthly for the first time | The previous bars stay on screen until the new data arrives; there is no loading indicator for the switch |
| New account with no listings | Cards show 0, the banner shows a zero amount, and the chart shows minimum-height bars for every label |
No error state or retry button
Unlike Earnings and the request detail screens, Analytics has no "Try again" state. If the dashboard API is down the screen looks like an account with no activity. Pull to refresh is the only retry.
What happens next
Nothing here changes server state. The same stats feed the dashboard home screen, and the numbers move when listings are created or change status and when tenants view properties or request inspections. The backend also exposes GET /api/v1/dashboard/analytics and GET /api/v1/dashboard/earnings, but the mobile app does not call them.
Earnings and Payouts
What the Earnings screen shows, where the payout bank account is validated, and which wallet and withdrawal features are not in the mobile app.
Chats and notifications
How agents, landlords and lawyers read and answer messages, what the Notifications screen really shows, and how push notifications are registered and routed.
HomeLink Hub