GET
/
analytics
/
user-traffic-sources
Traffic Source Analytics
curl --request GET \
  --url https://jmpy.me/api/v1/analytics/user-traffic-sources \
  --header 'Authorization: Bearer <token>'
{
  "success": true,
  "data": [
    {
      "source": "<string>",
      "clicks": 123,
      "percentage": 123
    }
  ]
}
Understand where your traffic is coming from. This endpoint categorizes engagement by source type, such as Direct, Social, Referral, Email, and Search.

Query Parameters

dateRange
string
default:"all_time"
Predefined date range: last_hour, last_24_hours, last_7_days, last_30_days, last_year, all_time, custom.
urlType
string
default:"all"
Filter by URL type: all, standard, branded, subdomain.
campaignId
string
Filter by Campaign UUID or name.
tags
string
Comma-separated list of tags to filter by.

Response

success
boolean
Whether the request was successful.
data
array

Request Examples

curl -X GET "https://jmpy.me/api/v1/analytics/user-traffic-sources?dateRange=last_7_days&tags=marketing" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response Example

{
  "success": true,
  "data": [
    { "source": "Direct", "clicks": 1500, "percentage": 45.0 },
    { "source": "Social", "clicks": 1200, "percentage": 36.0 },
    { "source": "Referral", "clicks": 300, "percentage": 9.0 },
    { "source": "Email", "clicks": 200, "percentage": 6.0 },
    { "source": "Search", "clicks": 133, "percentage": 4.0 }
  ]
}

Use Cases

Monitor the percentage of “Direct” vs “Referral” traffic to evaluate the health of your link distribution. High direct traffic often indicates strong brand recall or private messaging sharing (e.g., Slack, WhatsApp).
Compare “Social” and “Search” traffic spikes with your active ad periods to verify that your marketing spend is driving the expected volume of engagement through your shortened links.
Discover new websites or platforms that are linking to your content. If a specific “Referral” source is consistently high, you may want to establish a more formal partnership with that entity.