Overview
Journey’s reporting system transforms raw transactional data into actionable business insights. The platform includes 8 pre-built reports covering critical business metrics, with the ability to create custom reports using simple SQL queries.All reports are multi-tenant aware and automatically filtered to your merchant’s data. Export any report to Excel for further analysis.
Why Reports Matter
Reports provide the data-driven insights needed to:- Optimize revenue: Identify high-value customer segments and products
- Reduce churn: Track dunning subscriptions and payment failures before they become cancellations
- Improve operations: Monitor delivery performance and fulfillment efficiency
- Recover revenue: Reach out to abandoned cart customers with targeted campaigns
- Forecast growth: Analyze subscription signup trends and customer lifetime value
Pre-Built Reports
Journey includes 8 production-ready reports that cover the most common business intelligence needs.Abandoned Cart
Abandoned Cart
Track potential customers who started but didn’t complete their subscription signup.Use Cases:
- Email marketing campaigns to recover lost sales
- Identify friction points in checkout flow
- A/B test recovery messaging strategies
- Customer name and email
- Product they were interested in
- Date of abandonment (configurable date range)
Delivery Date Changes
Delivery Date Changes
Monitor when customers reschedule their deliveries and understand demand patterns.Use Cases:
- Identify delivery timing preferences
- Optimize delivery route planning
- Detect seasonal demand shifts
- Original vs. new delivery date
- Customer details
- Date when change was made (configurable date range)
Dunning Subscriptions
Dunning Subscriptions
Real-time view of subscriptions with payment failures, sorted by retry attempts.Use Cases:
- Proactive customer outreach before cancellation
- Payment method update campaigns
- Revenue recovery prioritization
- Subscription status (past_due or error)
- Number of settling attempts
- Customer contact information
- Subscription ID for quick lookup
Paused Subscriptions
Paused Subscriptions
Find valuable customers who paused their subscriptions after making successful payments.Use Cases:
- Win-back campaigns targeting engaged customers
- Identify pause reasons through customer interviews
- Re-engagement email sequences
- Customer details
- Count of successful payments before pause
- Current subscription status (on_hold or cancelled)
Paid Orders
Paid Orders
Complete transaction history with product-level detail.Use Cases:
- Revenue reporting and reconciliation
- Product performance analysis
- Customer purchase behavior tracking
- Customer information
- Product variations purchased
- Order date and item count
- Configurable date range filtering
Payments Export
Payments Export
Detailed payment data with line items, VAT breakdown, and customer information.Use Cases:
- Accounting system integration
- Tax reporting and compliance
- Revenue recognition
- Financial audits
- Payment ID and status
- Customer details including SSN (for tax reporting)
- Line item details with quantities and amounts
- VAT totals by rate
- Created and last attempt timestamps
Subscription Customers and Statuses
Subscription Customers and Statuses
Complete customer subscription overview with product details.Use Cases:
- Customer success outreach prioritization
- Product mix analysis per customer
- Subscription health monitoring
- Customer contact details
- All subscription order items
- Current subscription status
- Subscription ID for quick access
Subscription Statuses per Product
Subscription Statuses per Product
Product-level subscription health metrics.Use Cases:
- Product performance benchmarking
- Inventory planning by subscription status
- Identify products with high churn rates
- Product and product variation names
- Subscription counts by status (active, past_due, expired, on_hold, error, cancelled)
- Grouped by product for easy comparison
Report Interface
The reporting dashboard provides an intuitive interface for exploring your business data.Interactive Features
1
Select a Report
Click any report from the accordion list on the left sidebar. The report automatically loads with live data from your database.
2
Configure Date Range
For time-based reports, use the date range picker to filter results:
- Last 7 days: Quick view of recent activity
- Last 30 days: Monthly performance
- Last 90 days: Quarterly trends
- Custom range: Any date range for specific analysis
3
Review Results
Results display in a sortable table showing the first 5 rows. The total row count appears at the bottom.
4
Export to Excel
Click the “Download Excel” button to export the complete dataset (not just the preview rows) for deeper analysis in Excel, Google Sheets, or your BI tool.
Data Visualization
All reports show a live preview of your data. The table displays the first 5 rows, but Excel exports include all matching records.
Dashboard Analytics
Beyond custom reports, Journey provides real-time analytics on the dashboard overview page:Key Metrics
- Subscription Health
- Delivery Metrics
- Signup Analytics
- Activity Tracking
Active Subscriptions Count
- Total number of subscriptions with
status='active' - Real-time count from your subscription table
- Calculated across all subscription-based orders
- Indicates customer retention and lifetime value
- Total settled payment value divided by active subscriptions
- Critical metric for customer acquisition cost (CAC) optimization
Creating Custom Reports
Adding a new report to Journey requires minimal code and can be done in minutes.How Easy It Is
Journey’s reporting system is built on a simple, declarative architecture. Each report is defined by:- Title - Display name for the report
- Date Range Toggle - Whether to show date picker (true/false)
- SQL Query - A single SQL query that returns the data
1
Define Your Report
Add a new object to the
reports array in apps/me/app/dashboard/(main)/overview/actions.ts:2
Add Translations (Optional)
Add display names and descriptions in the translation files:
3
Test and Deploy
The report automatically appears in the reports sidebar. Click it to test:
- Verify SQL query returns expected columns
- Test date range filtering (if enabled)
- Export to Excel to confirm data export works
Best Practices for Custom Reports
Query Performance
Query Performance
Use Indexes:
- Ensure frequently queried columns have database indexes
- Pay special attention to date columns used in WHERE clauses
- Consider adding
LIMITclauses for very large datasets - The UI shows first 5 rows, but Excel exports all rows
- Use
GROUP BYand aggregation functions (COUNT, SUM, AVG) - Reduces result set size and improves readability
Multi-Tenant Awareness
Multi-Tenant Awareness
All reports automatically execute within the merchant’s tenant context. You don’t need to manually filter by Cross-Schema Queries:
If you need to query across tenants (superuser reports only), use the statistics endpoint instead of the reports system.
merchant_id.Automatic Tenant Isolation:Data Privacy
Data Privacy
Customer PII:
- Be mindful of including sensitive data (SSN, payment details)
- Consider access controls for reports containing PII
- Use reports for internal business analysis only
- Excel exports contain full datasets
- Educate users about secure file handling
- Consider implementing audit logs for report access
Example: Custom Report
Let’s create a report showing “High-Value Customers” (customers with 5+ successful payments):- ✅ Uses clear column aliases with proper casing
- ✅ Aggregates data to reduce result size
- ✅ Sorts by most important metric (revenue)
- ✅ Filters for business-relevant threshold (5+ payments)
- ✅ Doesn’t need date range (analyzing all-time data)
Technical Architecture
Temporarily removed for debugging.Analytics Snapshots
Journey includes a scheduled job that captures daily snapshots of key metrics for historical trend analysis.Automated Tracking: The
take_analytics_snapshot command runs daily via cron to record:- Subscription status distribution (active, past_due, on_hold)
- Total customer count
- Stored in
statistic_timestampeventtable
Snapshot Data
Subscription Status Snapshots:Using Snapshots in Reports
Snapshots enable trend analysis over time. Example query:Multi-Tenant Statistics
For superusers managing multiple merchants, Journey provides a cross-tenant statistics view.Statistics Dashboard
Access at/admin/stats/ to view:
Per-Tenant Metrics:
- Active subscriptions count
- Total subscriptions (all statuses)
- Total deliveries (all time)
- Deliveries this week vs. last week
- Deliveries this month vs. last month
- Deliveries this year vs. last year
- Percentage change calculations
- “Total” row showing sum across all tenants
- Delta calculations for growth tracking
Implementation
Best Practices
Report Usage
Report Usage
For Merchants:
- Review dunning report weekly to recover at-risk revenue
- Export payment data monthly for accounting reconciliation
- Track abandoned carts weekly for marketing campaigns
- Monitor delivery changes to optimize fulfillment
- Keep SQL queries focused and performant
- Use meaningful column aliases for exported Excel files
- Test reports with large date ranges before deploying
- Document business logic in SQL comments
Data Accuracy
Data Accuracy
Query Construction:
- Always use parameterized queries (SQL template tags)
- Handle NULL values explicitly in aggregations
- Use proper date truncation for time-series data
- Test edge cases (empty results, single row, millions of rows)
- Use
(toDate::date + INTERVAL '1 day')for inclusive date ranges - Always filter on indexed timestamp columns
- Consider timezone implications for global merchants
User Experience
User Experience
Report Design:
- Limit columns to essential information (10-15 max)
- Sort results by most actionable metric (revenue, attempt count, etc.)
- Use clear column names that make sense in Excel exports
- Provide descriptions explaining report purpose and use cases
- Performance:
- Target <2 second query execution time
- Show loading states for long-running queries
- Consider pagination for reports with 10,000+ rows
- Cache results when data doesn’t change frequently
Troubleshooting
Report Not Loading
Report Not Loading
Symptoms: Report shows loading state indefinitelySolutions:
- Check browser console for JavaScript errors
- Verify SQL query syntax is correct
- Test query directly in database with tenant context
- Check for missing indexes on filtered columns
- Verify date range parameters are valid
Empty Results
Empty Results
Symptoms: Report loads but shows “No data found”Solutions:
- Verify data exists in database for selected date range
- Check tenant context is correct (not querying wrong merchant)
- Review WHERE clause conditions (too restrictive?)
- Test query without date filters to isolate issue
- Confirm report is configured for correct dateRangePicker setting
Export Fails
Export Fails
Symptoms: Excel download button doesn’t work or file is corruptedSolutions:
- Check browser console for download errors
- Verify report data contains no invalid characters
- Test with smaller date range (large datasets may timeout)
- Ensure
downloadExcelutility handles all data types in results - Check for NULL values or special characters in string columns
Slow Query Performance
Slow Query Performance
Symptoms: Report takes >10 seconds to loadSolutions:
- Add database indexes on filtered/joined columns
- Review query execution plan (
EXPLAIN ANALYZE) - Consider pre-aggregating data in materialized view
- Reduce date range to smaller time windows
- Add LIMIT clause if full dataset isn’t needed