Skip to content

Artist Stats

artist_statistics returns daily view and clickthrough counts aggregated across every link belonging to an artist. It is the catalog-wide equivalent of Link Stats.

Arguments

ArgumentTypeRequiredDescription
artist_iduuid!YesThe ID of the artist.
start_timedate!YesStart of the period, UTC. ISO 8601 — YYYY-MM-DD or a full timestamp.
end_timedate!YesEnd of the period, UTC. Must be after start_time.
offsetStringNoAccepted for backward compatibility and currently ignored. Results are bucketed by UTC day.

Request

graphql
query ArtistStats(
  $artist_id: uuid!
  $start_time: date!
  $end_time: date!
) {
  artist_statistics(
    artist_id: $artist_id
    start_time: $start_time
    end_time: $end_time
  ) {
    events
  }
}

Variables:

json
{
  "artist_id": "3aad8009-a307-4429-a586-8b3dbe39cdda",
  "start_time": "2026-07-01",
  "end_time": "2026-07-31"
}

Response

json
{
  "data": {
    "artist_statistics": {
      "events": [
        { "count": 1284, "day": "2026-07-01", "event": "view" },
        { "count": 611,  "day": "2026-07-01", "event": "clickthrough" },
        { "count": 1402, "day": "2026-07-02", "event": "view" },
        { "count": 688,  "day": "2026-07-02", "event": "clickthrough" }
      ]
    }
  }
}

events

FieldDescription
dayUTC day, YYYY-MM-DD.
eventview or clickthrough.
countTotal across all of the artist's links that day.

Days with no activity are omitted rather than returned as zero — fill the gaps client-side when charting.

INFO

artist_statistics returns only events. Unlike link_statistics, it has no countries, campaigns, destinations, or platform_stats sections. For those breakdowns, call link_statistics per link and combine the results yourself.

How the aggregate is built

The field resolves the artist's full link list, then sums daily events across all of them. Two consequences:

  • A link created mid-period contributes only from its creation date onward, which shows up as a step in the series rather than a gap.
  • A deleted link's history drops out of the total, so a range you queried last month can return lower numbers today if links were removed in between. Snapshot the numbers if you need them to be stable.

Comparing periods

There is no built-in comparison. Run two queries and diff them:

graphql
query Compare(
  $artist_id: uuid!
  $this_start: date!, $this_end: date!
  $last_start: date!, $last_end: date!
) {
  current: artist_statistics(
    artist_id: $artist_id
    start_time: $this_start
    end_time: $this_end
  ) { events }

  previous: artist_statistics(
    artist_id: $artist_id
    start_time: $last_start
    end_time: $last_end
  ) { events }
}

Aliasing both into one document keeps it to a single round trip.

Which analytics field to use

NeedUse
Daily trend for one link, with country/campaign/device breakdownslink_statistics
Daily trend across an artist's whole catalogartist_statistics
Lifetime totals for every link at once, no date rangelink_totals
Lifetime totals for one link, cheapest possibleviews_total / clickthroughs_total on the link — see Get Link

Cheap-to-expensive: link counter fields, then link_totals, then artist_statistics, then link_statistics. Reach for the cheapest one that answers the question.

Notes and limits

  • Access is checked against artist ownership.
  • Data comes from a separate analytics store and may lag live traffic by a few minutes.
  • Cost scales with the artist's link count — an artist with hundreds of links makes this a slow call. Cache the result.

ArtistHub developer documentation