Analytics:Media

Show Media Traffic Breakdown

Retrieve traffic breakdown analytics for a video, grouped by a specified dimension such as UTM campaign, UTM source, UTM medium, referrer domain, or viewer screen size.

The date range between start_date and end_date must not exceed 2 years.

Requires api token with one of the following permissions

Read detailed stats

Tokens with the "Act with a team member's permissions" permission (all:delegate_to_contact_permissions scope) can also be used. Requests made with such a token are authorized using the permissions of the contact assigned to the token.

An expiring access token created with the all:delegate_to_contact_permissions scope and an authorization granting the view-stats permission on this media can also be used.

get/analytics/medias/{mediaId}/traffic

Request

  • Base URL
    https://api.wistia.com/modern
  • URL
    https://api.wistia.com/modern/analytics/medias/{mediaId}/traffic
  • Auth
    HTTP bearer

Path parameters

mediaIdstring required

The hashed ID of the media (e.g., "4d23503f70")

The hashed ID of the video.

Query parameters

start_datestring date required

Start date for the analytics period in ISO 8601 format (YYYY-MM-DD). Inclusive — the range starts at the beginning of this date.

end_datestring date required

End date for the analytics period in ISO 8601 format (YYYY-MM-DD). Exclusive — the range ends before the beginning of this date.

group_by'utm_campaign' | 'utm_source' | 'utm_medium' | 'referrer_domain' | 'viewer_screen_size' required

The dimension to group traffic data by.

sort_by'plays' | 'loads' | 'engagement_rate'

The metric to sort results by.

sort_direction'asc' | 'desc'

The sort direction.

per_pageinteger

Number of results to return (max 100).

Headers

X-Wistia-API-Versionstring required

Response

Success response with traffic breakdown data.

utm_campaignstring nullable

The UTM campaign value (present when group_by is utm_campaign).

utm_sourcestring nullable

The UTM source value (present when group_by is utm_source).

utm_mediumstring nullable

The UTM medium value (present when group_by is utm_medium).

referrer_domainstring nullable

The referrer domain (present when group_by is referrer_domain).

viewer_screen_sizestring nullable

The viewer screen size (present when group_by is viewer_screen_size).

loadsinteger nullable

The number of video loads for this group.

playsinteger nullable

The number of video plays for this group.

engagement_ratenumber float nullable

The average engagement rate for this group (between 0 and 1).

Changes

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