admin-affiliate

Aggregated affiliate click statistics

Aggregates every component_click_events record. Bot and crawler user agents (isBotUserAgent; a missing or empty user_agent counts as a bot) are removed first; their number is returned as botEventsFiltered.

  • today counts since 00:00 UTC; last7Days and last30Days are rolling windows ending now.
  • Country is resolved_country or unknown; source is source or unknown; app is the first _-separated part of the source when it is voltplan, cable, blog or calculator, otherwise voltplan.
  • Components are grouped by the event's component id, or by search:<name> when the event has none. Name and type come from the event, else from the components record, else Unknown / unknown.
  • components is sorted by total descending, with Unknown names last. The top-level totals and byCountry/bySource/byApp sum over all components.
get/api/admin/affiliate-stats

Request

  • Base URL: https://voltplan.app
  • URL: https://voltplan.app/api/admin/affiliate-stats
  • Auth: HTTP bearer

Response

Click statistics.

totalinteger required

All clicks.

todayinteger required

Clicks since 00:00 UTC today.

last7Daysinteger required

Clicks in the rolling 7 days ending now.

last30Daysinteger required

Clicks in the rolling 30 days ending now.

botEventsFilteredinteger required

Click events dropped as bot or crawler traffic, including events without a user_agent.

byCountryAdminAffiliateRangeCountsByKey required

Key (country, source or app) → click counts.

bySourceAdminAffiliateRangeCountsByKey required

Key (country, source or app) → click counts.

byAppAdminAffiliateRangeCountsByKey required

Key (country, source or app) → click counts.

Changes

No recorded changes to this operation across all 1 revision of this API.