Appearance
InsightCore Analytics API
The InsightCore Analytics API enables you to collect, analyze, and report on user behavior across your web properties. It provides event ingestion, real-time visitor tracking, historical reporting, and conversion funnel analysis.
Overview
InsightCore provides a lightweight analytics pipeline for web and ecommerce applications:
- Event Collection - Ingest page views, interactions, and ecommerce events via a simple POST endpoint
- JavaScript Tag - Drop-in analytics tag with automatic page view, scroll, and click tracking
- Real-Time Analytics - Active visitor counts, live event streams, and page views per minute
- Historical Reports - Page performance, traffic sources, event breakdowns, and ecommerce metrics
- Conversion Funnels - Define multi-step funnels and analyze drop-off rates
Data Flow
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ Your Website │ │ InsightCore │ │ Your Backend │
└────────┬────────┘ └────────┬────────┘ └────────┬────────┘
│ │ │
│ <script> tag loads │ │
│──────────────────────>│ │
│ rsp-analytics.js │ │
│<──────────────────────│ │
│ │ │
│ POST /v1/collect │ │
│ (page views, clicks, │ │
│ ecommerce events) │ │
│──────────────────────>│ │
│ │ │
│ │ GET /v1/analytics/* │
│ │<──────────────────────│
│ │ Reports, realtime, │
│ │ funnels │
│ │──────────────────────>│Base URLs
| Environment | URL |
|---|---|
| Staging | https://api-staging.insightcore.retailsuccessplatform.com/api/v1 |
| Production | https://api.insightcore.retailsuccessplatform.com/api/v1 |
Quick Start
1. Register Your Site
Create a site configuration to get your organization ID and allowed domains:
bash
curl -X POST https://api.insightcore.retailsuccessplatform.com/api/v1/settings \
-H "Authorization: Bearer ${TOKEN}" \
-H "Content-Type: application/json" \
-d '{
"site_name": "My Store",
"allowed_domains": ["mystore.com", "www.mystore.com"]
}'2. Install the JavaScript Tag
Add the analytics tag to your site. Replace YOUR_ORG_ID with your organization's hashkey:
html
<script>
var rspaq = rspaq || [];
rspaq.push(['init', 'YOUR_ORG_ID']);
</script>
<script async src="https://api.insightcore.retailsuccessplatform.com/api/v1/tag/rsp-analytics.js"></script>The tag automatically tracks page views, scroll depth, clicks, and form submissions.
3. Query Your Analytics
Fetch an overview report for the last 7 days:
bash
curl "https://api.insightcore.retailsuccessplatform.com/api/v1/analytics/reports/overview?from=2026-03-19&to=2026-03-26" \
-H "Authorization: Bearer ${TOKEN}"json
{
"data": {
"total_visitors": 12450,
"total_page_views": 38920,
"bounce_rate": 42.3,
"avg_session_duration_seconds": 185
}
}Authentication
| Endpoint | Auth | Rate Limit |
|---|---|---|
| Event Collection | None (public) | 60/min per IP |
| JavaScript Tag | None (public) | Cached (ETag) |
| Site Settings | OAuth Bearer | 100/min |
| Funnels | OAuth Bearer | 100/min |
| Real-Time Analytics | OAuth Bearer | 100/min |
| Reports | OAuth Bearer | 100/min |
The collection and tag endpoints are public — they accept events from browsers without authentication. All management and reporting endpoints require an OAuth 2.0 Bearer token from the Identity API.
Tracked Event Types
| Event Type | Source | Description |
|---|---|---|
page_view | Auto | Page loads and SPA navigations |
scroll_depth | Auto | Maximum scroll percentage reached |
click | Auto | Link and button clicks |
form_submit | Auto | Form submissions |
product_view | Manual | Product detail page views |
add_to_cart | Manual | Items added to cart |
checkout | Manual | Checkout initiated |
purchase | Manual | Order completed |
search | Manual | Search queries |
Next Steps
- Getting Started - Detailed integration guide
- Authentication - OAuth setup and scopes
- Event Collection Reference - Collection endpoint details
- JavaScript Tag Reference - Tag configuration and custom events
- Reports Reference - All reporting endpoints
- JavaScript Example - Full integration example
Changelog
| Date | Change |
|---|---|
| 2026-03-26 | Initial publication. |