Filter Visit Logs by UTM

Count visit logs matching specific UTM parameter filters.

Endpoint

GET /v2/external/client/analytics/filter-visit-logs

Query Parameters

Parameter Type Required Description
shortUrl string Yes Returned opaque link ID (preferred), or a code
domainId string No Disambiguate a code on a custom domain
startDate string Yes Start date (YYYY-MM-DD)
endDate string Yes End date (YYYY-MM-DD)
utmSource string No Filter by UTM source
utmMedium string No Filter by UTM medium
utmCampaign string No Filter by UTM campaign

Response

{
  "status": true,
  "message": "UTM analytics count fetched successfully",
  "data": 125
}

The response is a single number representing the count of matching visit logs.

Example

Count visits from Google Ads campaign "summer-sale":

GET /v2/external/client/analytics/filter-visit-logs?shortUrl=abc123&startDate=2024-01-01&endDate=2024-01-31&utmSource=google&utmMedium=cpc&utmCampaign=summer-sale

Notes

  • All UTM filters are optional and can be combined
  • Date range is inclusive
  • Data retention limits apply
  • Results are cached for 1 hour
  • Results are workspace-scoped to the API key org

Domain scope

Use shortUrl=RETURNED_LINK_ID to select one link unambiguously, or add domainId=DOMAIN_ID when passing a code. Access is checked before cache reads; logs are queried by the resolved link ID. Unknown/inaccessible records fail; ambiguous codes return 409. Historical logs without a link ID are not mixed across domains.