PubNub Insights
PubNub Insights provides pre-built analytics dashboards based on your app's PubNub data. It answers questions about how your app is used: how many users are active, which channels have traffic, how many messages are published, and how usage trends change over time.
Insights works from the traffic your app already sends to PubNub. You add no extra instrumentation or separate SDK.
What Insights measures
Insights aggregates data your app generates through PubNub into metrics across four areas:
| Area | Example metrics |
|---|---|
| Messages | Messages published, message types, messages by country |
| Users | Unique users, new vs. returning users, users by country |
| Channels | Unique channels, channels with messages |
| User behavior and devices | Session counts, device types (Premium only) |
Availability
The Starter and Pro plans include Insights Premium.
| Insights tier | Included with | Dashboards | Data range |
|---|---|---|---|
| Insights Premium | Starter plan. Pro plan for new contracts, and for existing Pro contracts from their next renewal. | Account, App, and all keyset dashboards | 90 days to 3 years |
| Insights Standard | Existing Pro contracts until their next renewal | Keyset dashboards except User Behavior and Devices | Last 24 hours, today, and yesterday |
If your account uses Insights Standard, you can upgrade to Insights Premium before your renewal. Select Upgrade in Insights.
Access
Open the Admin Portal and select Insights from the sidebar.
The first time you open Insights, select one or more use cases that describe how your app uses PubNub, such as Chat or IoT. Your selection determines which dashboards load by default and how the Messages dashboard categorizes traffic. You can change the use case at any time in Dashboard Settings.
Dashboards
Insights organizes data into dashboards at three levels: account, app, and keyset. For what each dashboard shows and which tier includes it, see Insights dashboards.
Messages Configuration
By default, Insights tracks message types when your payloads follow PubNub's message type conventions. If your payloads use a different schema, provide a JSON path in Messages Configuration to map your data to the metrics Insights tracks.
Export and analysis features
Insights includes these features for exporting and analyzing your dashboard data:
- Chart data export. Export any chart for external analysis or sharing. The export menu appears in the upper-right corner of each chart.
- Analyze with AI (Premium). Runs GPT-based analysis on your dashboard data. You provide a prompt and Insights returns statistical summaries, anomaly identification, pattern analysis, forecasts, or recommended actions. Currently in preview.
- Expanded Data Download (Premium). Downloads the top 1,000+ channels and users for deeper analysis, filtered by message count, users with messages, or subscriber count over hourly or daily periods.
Insights API
Insights metrics are available programmatically through the Admin API. The Insights API requires Insights Premium. The /v2/insights endpoint returns general metrics and /v2/insights/top returns top channels and users, for an account, app, or keyset. For metric names and the periods each one supports, see Insights API metrics.