GET
https://jmpy.me/api/v1
/
analytics
/
analytics
/
{shortUrlId}
Core Metrics
curl --request GET \
  --url https://jmpy.me/api/v1/analytics/analytics/{shortUrlId} \
  --header 'Authorization: Bearer <token>'
{
  "total_clicks": 123,
  "unique_clicks": 123,
  "new_visitors": 123,
  "returning_visitors": 123,
  "avg_session_duration": 123,
  "active_days": 123,
  "active_hours": 123
}
Retrieve comprehensive core engagement metrics for a short URL, including total clicks, unique visitors, new vs. returning visitors, and engagement over time.

Parameters

shortUrlId
string
required
The unique ID or short code of the URL.
startDate
string
Filter data starting from this date (ISO 8601 format).
endDate
string
Filter data up to this date (ISO 8601 format).
groupBy
string
default:"day"
Time granularity for the response (day, hour).

Request Examples

curl -X GET "https://jmpy.me/api/v1/analytics/analytics/google-redirect?startDate=2024-01-01&endDate=2024-01-30" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response Examples

{
  "total_clicks": 1500,
  "unique_clicks": 1200,
  "new_visitors": 1100,
  "returning_visitors": 400,
  "avg_session_duration": 45.5,
  "active_days": 30,
  "active_hours": 24,
  "filters": {
    "startDate": "2024-01-01T00:00:00.000Z",
    "endDate": "2024-01-30T00:00:00.000Z",
    "groupBy": "day"
  }
}

Response Fields

total_clicks
number
Total number of clicks recorded in the period.
unique_clicks
number
Number of unique visitors (distinct IPs/sessions).
new_visitors
number
Number of first-time visitors.
returning_visitors
number
Number of returning visitors.
avg_session_duration
number
Average time spent by users (in seconds).
active_days
number
Number of days with at least one click.
active_hours
number
Total count of active hours with traffic.

Use Cases

Use the new_visitors and returning_visitors metrics to understand how well your content retains audience interest. A high ratio of returning visitors indicates strong engagement.
Fetch core metrics for a specific date range matching your marketing campaign flight dates to report on total reach (unique_clicks) and engagement volume (total_clicks).