YouTube Video Report

The YouTube Video Reports Connector provides automated access to custom YouTube analytics reports.

Prerequisites

The YouTube Video Reports Connector requires Google OAuth authentication to access its data.

To authenticate via OAuth you must add a Key with the Credential Type Google OAuth, enter a Key Name (used in the Switchboard Script below) and perform the Oauth flow by clicking the button labeled Connect.

As part of the YouTube OAuth flow, you must pick a YouTube channel.

Scheduling

The YouTube Video Reports connector can be scheduled to ingest data once per day at a user-defined hour and timezone.

By default, the connector will run once at 6am PT.

See Daily Scheduling for more information.

Parameters

For limitations on combinations of dimensions and filters, please consult the YouTube Channel Reports documentation.

dimensions list of strings
optional
Common criteria that are used to aggregate data, such as the date on which an action occurred or the country where the users were located. Please consult the list of dimensions described in the YouTube API documentation.
filters list of strings
optional
This parameter explains how the report data will be filtered. So, for example, instead of returning all of the data for a channel, a report could be filtered to only contain metrics for a certain country, video, or group of videos.
metrics list of strings
required
Individual measurements related to user activity, ad performance, or estimated revenue. User activity metrics include things like video view counts and ratings (likes and dislikes). Please consult the list of metrics described in the YouTube API documentation.
sort string
optional
The API supports the ability to sort response data using multiple dimensions or metrics. Note that certain dimensions require that a sort parameter be specified. Please consult the sample requests provided in the API documentation for additional details.

Sample Switchboard Script

download bundle t {
    type: "youtube:targeted_channel_bundle";
    key: "youtube_key";

    // This is not used with the API in anyway; it only exists to distinguish multiple YouTube imports.
    channel_name: "<your words here>";

    // allows_daily_schedule

    table videos using {*};

    table report_1 from {
        // example: ["likes", "views"]
        metrics: [...];

        // example: ["country"]
        dimensions: [...];

         // example: ["isCurated==1", "insightPlaybackLocationType==EMBEDDED"]
         filters: [...];

         // example: "views"
         sort: "...";
    } using {*};

    table report_<2, 3...N> from {
        // additional reports with different metric, dimension, filter and sort settings
     } using {*};
}