Revenue
This feature is part of Countly Enterprise. To get access, contact sales or compare versions. Existing customers can reach the support portal with questions.
Overview
The Revenue feature tracks and analyzes in-app purchase and monetization metrics. Monitor paying users, revenue trends, and purchase patterns across time periods. Segment revenue data by in-app events and calculate paying user metrics automatically.
Key Features
- Paying User Tracking: Identify and track users who have made purchases
- Revenue Metrics: Calculate total revenue, revenue per user, purchase frequency
- Event-Based Revenue: Associate revenue with specific in-app purchase events
- Time-Based Analytics: Revenue trends by day, week, month, year
- User Segmentation: Filter revenue by user properties and cohorts
- Dashboard Integration: Revenue widgets show key metrics
- Period Analysis: Compare revenue across custom date ranges
- Purchase Frequency: Track repeat purchase behavior
Configuration
Revenue feature configuration includes:
| Setting | Type | Description |
|---|---|---|
iap_events | Array | List of event names representing in-app purchases |
The iap_events configuration specifies which events should be counted as purchases. These events typically have sum values representing purchase amounts.
Revenue Tracking
Revenue is tracked through:
-
User Properties (stored in app_users collection):
tp(total purchases amount): Cumulative revenue from usertpc(total purchase count): Total number of purchaseslp(last purchase timestamp): Time of most recent purchaselpa(last purchase amount): Amount of most recent purchasepurchased(purchased status): "yes" if user has made purchases
-
Users Aggregation (stored in users collection):
d.pord.{period}.p: Count of paying users in period- Tracked at day, week, month, and year granularities
API Endpoints
Read Endpoints
- Revenue - Analytics - GET /o/revenue
Dashboard Integration
- Revenue widgets automatically calculate and display metrics
Export Data
Revenue data can be exported for external analysis through:
- Revenue time-series data (paying users, totals)
- Custom event filtering
- Period-based analysis
Authentication Requirements
All revenue endpoints require:
- Feature Permission:
revenuefeature enabled for user - App Access: User must have read access to the specific app
- Method: GET or POST (both accepted)
Common Use Cases
- Revenue Dashboard: Display revenue trends and metrics
- Period Comparison: Compare revenue across time periods
- Event Analysis: Analyze revenue from specific purchase events
- Paying User Tracking: Monitor active paying user count
- Revenue Forecasting: Predict future revenue based on trends
- Custom Reports: Export revenue data for business intelligence
Related Features
- Events - Define purchase events
- Drill - Analyze event data in detail
- Data Manager - Configure event properties
Best Practices
- Event Naming: Use clear event names for purchase events (e.g.,
purchase,in_app_purchase) - Amount Tracking: Always include
sumvalue for revenue events - Timestamp Recording: Ensure accurate timestamps on purchase events
- Regular Analysis: Monitor revenue trends regularly for insights
- Segmentation: Analyze revenue by user properties for better targeting
- Data Validation: Verify IAP events are being tracked correctly
Performance Considerations
- Revenue calculations performed asynchronously
- Large date ranges may require additional processing time
- Paying user aggregation cached for dashboard efficiency
- Custom queries filtered through drill database
Implementation details
Database Collections
- Collection:
countly.app_users{app_id}- Stores user purchase data (tp, tpc, lp, lpa, purchased)
- Collection:
countly.users- Aggregated paying user counts by time period
- Collection:
countly_drill.drill_events- Source for revenue event data
- Collection:
countly.apps- Stores IAP event configuration