Skip to content

Analytics & Reporting - Product Requirements Document

Version: 2.0 | Status: Final Draft | Last Updated: 2026-01-15

Change Log

VersionDateChanges
1.0InitialTechnical draft with implementation details
2.02026-01-15Converted to business-focused format; added success metrics; consolidated requirements; strengthened acceptance criteria

1. Overview

1.1 Purpose

The Analytics & Reporting system provides business intelligence and operational visibility across the Toprent.app platform through two distinct capabilities:

  1. Tenant Analytics Dashboard: Enables rental companies to analyze their order data, revenue, and operational metrics through an in-app dashboard with CSV export for external analysis.

  2. Platform Intelligence (Internal): Collects anonymized feature usage data across all tenants to inform product decisions, track adoption patterns, and identify optimization opportunities.

1.2 Business Value

For Rental Companies (Tenant-Facing)

Value ClaimMeasurable OutcomeMeasurement Method
Revenue visibility100% of financial data accessible in single viewDashboard completeness audit
Faster reportingReduce report generation time by 75% (from 2+ hours to <30 min)Time-study comparison vs. manual Excel work
Data-driven decisionsEnable weekly performance reviews (vs. monthly/quarterly)Tenant engagement analytics

For Toprent.app (Internal Platform Analytics)

Value ClaimMeasurable OutcomeMeasurement Method
Product intelligenceTrack 100% of key feature interactionsEvent coverage audit in Mixpanel
Data-driven roadmapBase 80% of feature prioritization on usage dataPM decision documentation review
Adoption insightsIdentify underutilized features (<20% adoption) for improvementMonthly feature adoption report
Performance visibilityDetect error patterns within 24 hoursSentry + Mixpanel correlation analysis

1.3 Target Users

User RolePrimary GoalsAccess Level
Company AdminAnalyze business performance, generate reports, export dataOwn company data only
Product ManagerUnderstand feature adoption, prioritize roadmapAnonymized cross-tenant data
Engineering TeamMonitor system health, identify technical issuesAnonymized performance data
Data AnalystGenerate platform-wide insightsAnonymized aggregate data

1.4 Scope

In Scope:

  • In-app analytics dashboard with date filtering and CSV export (tenant-facing)
  • Real-time event tracking infrastructure for feature usage
  • Privacy-preserving analytics with hashed identifiers
  • Batch export APIs for historical data backfill

Out of Scope:

  • Tenant access to platform-wide analytics
  • Visual charts or real-time dashboards in tenant UI (CSV export only)
  • Predictive analytics or automated insights
  • Custom report builders

2. Success Metrics

2.1 Tenant Analytics Dashboard

MetricDefinitionBaselineTargetMeasurement MethodTimeframe
Dashboard Adoption% of active tenants using analytics monthly0% (new feature)40%Analytics usage events6 months
Export FrequencyAverage exports per tenant per month02+Export event tracking3 months
Report Time SavingsTime to generate monthly report2+ hours (manual)<30 minUser survey + time study3 months
Query PerformanceAverage analytics query response timeN/A<15 secondsSystem monitoringOngoing

2.2 Platform Intelligence (Internal)

MetricDefinitionBaselineTargetMeasurement MethodTimeframe
Event Coverage% of key features tracked0%100%Event audit vs. feature list3 months
Data QualityEvents with complete required propertiesN/A99%+Mixpanel data validationOngoing
Tracking LatencyTime from action to Mixpanel receiptN/A<5 secondsEvent timestamp analysisOngoing
Error Rate% of failed analytics eventsN/A<0.1%Sentry error monitoringOngoing
Privacy ComplianceEvents containing PIIN/A0Automated PII scanningOngoing

2.3 Business Impact

MetricDefinitionBaselineTargetMeasurement MethodTimeframe
Data-Driven DecisionsRoadmap decisions backed by usage data~20%80%PM decision log review6 months
Feature DiscoveryUnderutilized features identified05+ per quarterAdoption analysisQuarterly
Time to InsightDays to answer product questions3-5 days<1 dayPM request tracking3 months

3. User Stories

3.1 Tenant Admin Users

IDPriorityUser StoryAcceptance Criteria
US-TA1P0As a company admin, I want to view my company’s order analytics for a date range so I can analyze business performanceGiven admin accesses Analytics, When they select dates ≤180 days, Then order data displays within 30 seconds
US-TA2P0As a company admin, I want to export analytics as CSV so I can perform detailed analysis in spreadsheetsGiven analytics data is loaded, When admin clicks export, Then CSV downloads with all displayed data
US-TA3P1As a company admin, I want complete financial visibility (revenue, profit, expenses, payments) so I can track profitabilityGiven analytics displays, Then all financial fields are included and correctly calculated
US-TA4P2As a company admin, I want to see performance by customer, vehicle, and operator so I can identify top performersGiven analytics displays, Then dimension breakdowns are available in export

3.2 Internal Product Team

IDPriorityUser StoryAcceptance Criteria
US-PT1P0As a product manager, I want to see reservation creation volume so I can track core product usageGiven reservations are created, Then events appear in Mixpanel within 5 seconds
US-PT2P0As a product manager, I want to track feature adoption rates so I can prioritize improvementsGiven features are used, Then usage data is available for analysis
US-PT3P1As a product manager, I want to identify payment method preferences so I can prioritize integrationsGiven payments are processed, Then payment type distribution is visible
US-PT4P1As an engineering lead, I want to track failure events so I can identify and fix systemic issuesGiven errors occur, Then failure events are captured with relevant context

3.3 Platform Operations

IDPriorityUser StoryAcceptance Criteria
US-PO1P0As a platform admin, I want analytics events captured automatically so usage patterns are tracked without manual interventionGiven key actions occur, Then events emit automatically
US-PO2P0As a security engineer, I want tenant identifiers anonymized so data privacy is maintainedGiven events are sent, Then all IDs are hashed/encrypted, zero PII present
US-PO3P1As a developer, I want export APIs for bulk data so I can backfill historical analyticsGiven export API is called, Then historical data uploads to Mixpanel

4. Functional Requirements

4.1 Tenant Analytics Dashboard

IDRequirementBusiness Rationale
FR-4.1.1Dashboard must be accessible from Settings > Analytics for admin usersCentralized access point for business intelligence
FR-4.1.2Date range selection with maximum 180-day spanBalances data access with system performance
FR-4.1.3Analytics must include: order details, customer info, vehicle info, financial data, payment data, operator/courier assignmentsComplete operational visibility in single view
FR-4.1.4System must calculate derived metrics: total days, total income, extra charges, due balanceAutomated calculations reduce manual effort
FR-4.1.5CSV export with localized headers and filename including date rangeEnables external analysis and record-keeping
FR-4.1.6Clear loading states and empty state messagingProfessional user experience

4.2 Platform Event Tracking

IDRequirementBusiness Rationale
FR-4.2.1Track reservation events (created, failed) with pricing and location dataCore product usage visibility
FR-4.2.2Track payment events (invoices, payments) with amount and methodRevenue stream analysis
FR-4.2.3Track vehicle events (created, updated) with classification dataFleet management adoption
FR-4.2.4Track feature-specific events (AI scanning, signature requests, exports, autofill)Feature adoption measurement
FR-4.2.5Support both server-side and client-side event emissionComplete interaction coverage
FR-4.2.6All events must include hashed tenant ID and anonymized user IDCross-tenant analysis with privacy

4.3 Privacy and Security

IDRequirementBusiness Rationale
FR-4.3.1Encrypt/hash all tenant and user identifiers before analytics transmissionMaintain data privacy compliance
FR-4.3.2Never include PII in analytics: no names, emails, phones, detailed addressesRegulatory compliance (GDPR)
FR-4.3.3Standardize location data to country/city level onlyBalance geographic insights with privacy
FR-4.3.4Analytics failures must not impact business operationsSystem reliability priority
FR-4.3.5All tracking must be asynchronous and non-blockingUser experience priority

4.4 Export APIs (Historical Backfill)

IDRequirementBusiness Rationale
FR-4.4.1Authenticated export endpoints for orders, vehicles, users, payments, invoicesComplete historical data migration
FR-4.4.2Batch processing with configurable batch sizeHandle large datasets without timeout
FR-4.4.3Filter to active companies (recent login) by defaultOptimize processing resources
FR-4.4.4Apply same privacy controls as real-time eventsConsistent data protection

5. Acceptance Criteria

5.1 Tenant Dashboard

IDCriteriaTest Method
AC-TD1Admin can select date range ≤180 days and receive analytics within 30 secondsPerformance test with maximum date range
AC-TD2Analytics includes all financial, operational, and entity dataData completeness audit
AC-TD3System displays clear error when date range exceeds limitValidation testing
AC-TD4CSV export includes all displayed data with correct calculationsExport comparison test
AC-TD5Derived metrics (income, balance, days) calculate correctlyCalculation verification

5.2 Platform Analytics

IDCriteriaTest Method
AC-PA1Server-side events emit within 5 seconds of actionEvent latency monitoring
AC-PA2Client-side events emit on user interactionIntegration testing
AC-PA3All events contain hashed accountId and distinctIdEvent property audit
AC-PA4Zero PII present in any analytics eventPII scanning automation
AC-PA5Analytics tracking does not impact page load or action performancePerformance benchmarking
AC-PA6Analytics errors logged to monitoring without breaking featuresFailure injection testing
AC-PA7Analytics data not exposed to tenants via any interfaceSecurity audit

5.3 Export APIs

IDCriteriaTest Method
AC-EA1Exports require authenticationSecurity testing
AC-EA2Batch processing handles 100+ companies without timeoutLoad testing
AC-EA3Exported events include timestamps for historical accuracyData validation
AC-EA4Privacy controls applied consistently with real-time eventsPrivacy audit

6. Business Rules

6.1 Tenant Dashboard Rules

IDRuleRationale
BR-6.1.1Maximum date range: 180 daysPrevent database overload and ensure query performance
BR-6.1.2Total days calculated per tariff variant and buffer settingsAccurate billing-aligned reporting
BR-6.1.3Income = sum of payments; Balance = total price - paymentsStandard financial calculations
BR-6.1.4Owner displayed as “Own” or partner company nameClear ownership visibility

6.2 Privacy Rules

IDRuleRationale
BR-6.2.1Tenant IDs must be encrypted before analytics transmissionAnonymize tenant identity
BR-6.2.2User IDs converted to global format for anonymizationProtect user privacy
BR-6.2.3No PII in any analytics eventGDPR compliance
BR-6.2.4Location data limited to city/countryBalance insights with privacy
BR-6.2.5Analytics failures must fail silentlyBusiness continuity priority

6.3 Export Rules

IDRuleRationale
BR-6.3.1Export APIs internal-only with authenticationSecurity requirement
BR-6.3.2Process only active companies by defaultResource optimization
BR-6.3.3Default batch size: 10 companiesPrevent timeout issues
BR-6.3.4Individual record failures must not fail entire batchMaximize data export success

7. Dependencies

7.1 Depends On

PRDDependency TypeSpecific Requirements
PRD-01 Multi-tenantDataScoped database access, company isolation
PRD-02 AuthenticationSecurityAdmin role verification, user context
PRD-03 Vehicle ManagementDataVehicle attributes for analytics
PRD-04 Client ManagementDataCustomer data for reporting
PRD-05 Partner ManagementDataPartner relationships
PRD-06 Order SystemDataOrder data (core analytics source)
PRD-07 Pricing EngineLogicTariffication for day calculations
PRD-08 Insurance/ExtrasDataExpense data
PRD-09 PaymentsDataPayment events and data
PRD-10 CommunicationsEventsEmail dispatch tracking
PRD-11 Document ManagementEventsSignature request tracking
PRD-12 Fleet OperationsEventsReminder and courier tracking

7.2 Depended By

None. Analytics is a consuming domain that does not block other features.


8. Non-Functional Requirements

CategoryRequirementTargetMeasurement
PerformanceDashboard query response<30 seconds for 180-day rangeSystem monitoring
PerformanceEvent tracking overhead<10ms per eventPerformance profiling
ScalabilityEvent throughput1000+ events/minuteLoad testing
PrivacyPII in eventsZeroAutomated scanning
ReliabilityAnalytics availabilityDoes not impact business operationsFailure injection tests
ComplianceGDPR adherenceFull compliance via anonymizationCompliance audit
SecurityExport API accessInternal-only with authenticationSecurity audit

9. Glossary

TermDefinition
Platform AnalyticsInternal analytics tracking feature usage across all tenants (not accessible to tenants)
Tenant DashboardIn-app analytics UI where admins view and export their own company’s data
Analytics EventTracked occurrence of business or user action sent to analytics platform
DistinctIdAnonymized user identifier for tracking
AccountIdEncrypted tenant identifier for cross-tenant analysis
PIIPersonally Identifiable Information - never included in analytics
Export APIInternal batch endpoints for historical data migration
Active CompanyTenant with login activity within last 3 months

10. Open Questions

  1. Tenant dashboard - any plans for visual charts/graphs vs. CSV-only?
  2. Export APIs - retention policy for backfilled historical data?
  3. Feature tracking - complete event list confirmed?
  4. Active company threshold - 3 months appropriate?