The Sisense YouTube Analytics connector is a standalone connector that allows you to import data from the YouTube Analytics API into the ElastiCube Manager. After you have downloaded and installed the connector, you can connect to the YouTube Analytics  API through a connection string you provide Sisense in the ElastiCube Manager. The connection string is used to authenticate users who connect to the YouTube Analytics API. To obtain a connection string, you will need to create a YouTube Analytics app.

Once you have connected to YouTube Analytics, you can import a variety of tables from the YouTube Analytics API.

This page describes how to install the YouTube Analytics connector, how to connect to YouTube Analytics with a connection string, and what tables you can import into the ElastiCube Manager:

Installing the YouTube Analytics Connector

Sisense provides the YouTube Analytics connector as a standalone connector that you can download and add to your list of default Sisense connectors.

To install the YouTube Analytics connector:

  1. Download the YouTube Analytics installation file.
  2. Open the installation file and click Install.
  3. After the installation process is complete, click Close.

The YouTube Analytics connector is displayed in the ElastiCube Manager under Add Data > Web Services.

youtubeanalytics

Connecting to the YouTube Analytics REST API

To access YouTube Analytics’ REST API from the ElastiCube Manager, you must provide valid Oauth YouTube Analytics credentials through a connection string. These credentials are provided by YouTube Analytics when you create an application.

After you receive your credentials from YouTube Analytics, you can create the connection string and provide Sisense with it to connect to your data.

Creating an App

You can follow the procedure below to register an app and obtain the OAuth client credentials, the Client Id and Client Secret:

  1. Log in to the Google API Console.
  2. Select a project or create a new one.
  3. In the API Manager menu, click Credentials > Create Credentials > OAuth Client Id > Other.
  4. Click Create. The OAuthClientId and OAuthClientSecret are displayed.
  5. Click Library > YouTube Analytics API > Enable API.

Authenticating through YouTube Analytics

After setting the following properties, you are ready to connect:

  • OAuthClientId: Set this to the Client Id in your app settings.
  • OAuthClientSecret: Set this to the Client Secret in your app settings.
  • ChannelId: Set this to the YouTube Analytics Channel (Profile). This can be set to the Id of the channel. If not specified, MINE will be used.
  • ContentOwnerId: Set this to the Id of the content owner.
  • CallbackURL: Set this to http://localhost.

When you connect the driver opens the OAuth endpoint in your default browser. Log in and grant permissions to the application. The driver completes the OAuth process.

Adding YouTube Analytics Tables to your ElastiCube

Sisense uses connection strings to connect to YouTube Analytics and import data into the ElastiCube Manager. Each connection string contains a authentication parameters that the data source uses to verify your identity and what information you can export to Sisense. To learn more, see Connection String Parameters.

To add YouTube Analytics data:

  1. In ElastiCube Manager, click Add Data and then, YouTube Analytics. The Connect to YouTube Analytics window is displayed.
  2. In Datasource Connection String, enter your connection string.
  3. Click Connect to Server. YouTube Analytics is displayed in the Select Database list.
  4. Click OK. Sisense connects to YouTube Analytics and displays a list of tables available for you to import.
  5. Select the relevant tables and click Add.
    The tables are displayed in the ElastiCube Manager.

YouTube Analytics Tables

The Sisense YouTube Analytics connector allows you to import the following tables into the ElastiCube Manager.

NameDescription
GroupItemsCreate, delete, and query Items that compose a Group.
GroupsCreate, update, delete, and query YouTube Analytics Groups.
AdPerformanceReportsQuery Ad Performance Reports. Ad Performance Reports provide impression-based metrics for ads that ran during video playbacks. These metrics account for each ad impression, and each video playback can yield multiple impressions.

To access AdPerformanceReports, in the WHERE clause, you should specify at least the video, group or a supported combination of uploaderType and claimedStatus.

Optionally, the following filters can be specified: country, continent, subcontinent

For dimensions, the 'adType' type is required. Optionally, 'day' dimension can be added. An example query similar to yours would be (notice, AdPerformanceReports view does not have a channel column, instead you have to use a video filter. This is a limitation of the YouTube Analytics API):

SELECT AdType, Day, GrossRevenue, StartDate, EndDate FROM AdPerformanceReports WHERE video='vid123' and continent = '019'
DemographicsQuery YouTubeAnalytics Demographics grouped by age groups and gender.
DevicesQuery YouTubeAnalytics Devices or Operating System statistics. This table allows you to aggregate viewing statistics based on the manner in which viewers reached your video content. For example, you can identify the number of views that occurred on mobile devices or game consoles.
EngagementReportsQuery Engagement Reports info. For example, how many times a user shared a video.
TimeBasedReportsQuery time-based info on views, subscribers, etc. For example, how many new subscribers were gained at a specific time.
TopVideosQuery the TopVideos for a channel or the TopPlaylists if you are a content owner. You can also use this view to query playback detail and geographic filters.
TrafficSourcesQuery TrafficSources. Statistics are based on the manner in which viewers reached your video and playlist content.

Versions

VersionRelease DateImprovements
6.6.0.45March 16, 2017The AdPerformanceReports was enhanced to support more combinations of columns to query.
6.5.1.20January 16, 2017General release