Analytics:Account

Find Media By Embed Location

Find the media embedded at a given URL. Returns the hashed IDs of the account's media that recorded activity at that embed location during the date range, ranked by plays. The resulting hashed IDs can be passed to other endpoints, such as Show Account Top Content's hashed_ids[] filter, to fetch analytics for those media.

The domain of embed_url is always matched exactly. Its path is matched exactly by default, or as a prefix with path_match=prefix (e.g. /pricing also matching /pricing/plans). A path that is empty or / is ignored, returning media across all paths on the domain.

Embed location data is retained for 6 months; a start_date older than that returns a 422 error. When start_date and end_date are omitted, the full 6-month queryable window is used.

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 account authorization granting the view-stats permission can also be used.

get/analytics/account/media_by_embed_location

Request

  • Base URL
    https://api.wistia.com/modern
  • URL
    https://api.wistia.com/modern/analytics/account/media_by_embed_location
  • Auth
    HTTP bearer

Query parameters

embed_urlstring required

The URL of the page to look up, e.g. https://example.com/pricing. The protocol is optional (https is assumed), so example.com/pricing also works.

start_datestring date

Start date for the analytics period in ISO 8601 format (YYYY-MM-DD). Inclusive — the range starts at the beginning of this date. Must be within the last 6 months. Defaults to 6 months ago, the start of the queryable window.

end_datestring date

End date for the analytics period in ISO 8601 format (YYYY-MM-DD). Exclusive — the range ends before the beginning of this date. Defaults to tomorrow, so today's activity is included.

path_match'exact' | 'prefix'

How to match the path of embed_url against embed locations. exact requires the path to match exactly; prefix matches any embed path starting with it.

per_pageinteger

Number of media hashed IDs to return (max 1000).

Headers

X-Wistia-API-Versionstring required

Response

Success response with the hashed IDs of media embedded at the location.

media_hashed_idsstring[]

Hashed IDs of media embedded at the location, ranked by plays.

Changes

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