Connecting to YouTube Analytics

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.
  4. The YouTube Analytics connector is displayed in the ElastiCube Manager under Add Data > Web Services.

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 OAuthClientId and OAuthClientSecret:

  1. Log in to the Google Developers Console.
  2. Click Create Project or select an existing project.
  3. In the API Manager, click Credentials > Create Credentials > OAuth Client Id.
  4. Click Configure Consent Screen to customize the information displayed to users when they connect.
  5. If you are connecting from a desktop application, click Other in the Application Type section. If you are connecting from a Web application, click the Web Application option. In the Authorized Redirect URIs box, enter the URL you want to be used as a trusted redirect URL, where the user will return with the token that verifies that they have granted your app access.
  6. Click Create. The OAuthClientId and OAuthClientSecret are displayed. Save these credentials as they need to be passed to YouTube in the connection string when importing data into the ElastiCube Manager.
  7. Click OK.
  8. Select Library > YouTube Analytics API.

  9. Click Enable.

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.

After you have obtained the relevant credentials, you can create the connection used to connect to your YouTube account. The YouTube Analytics connection string has the following structure:


The following is an example of a YouTube Analytics connection string:



The example above includes mandatory parameters you can provide in the connection. The required parameters are emphasized in bold.

Mandatory 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.

Name Description
GroupItems Create, delete, and query Items that compose a Group.
Groups Create, update, delete, and query YouTube Analytics Groups.
AdPerformanceReports Query 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, subcontinentFor 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'
Demographics Query YouTubeAnalytics Demographics grouped by age groups and gender.
Devices Query 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.
EngagementReports Query Engagement Reports info. For example, how many times a user shared a video.
TimeBasedReports Query time-based info on views, subscribers, etc. For example, how many new subscribers were gained at a specific time.
TopVideos Query 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.

Query TrafficSources. Statistics are based on the manner in which viewers reached your video and playlist content.


Version Release Date Improvements June 20, 2017 Support added for retrieving all videos based on channel SELECT * FROM Videos WHERE ChannelId IN (SELECT Id FROM Channels)Many of the tables have been updated to include additional inputs such as OnBehalfOfContentOwner (string) and ForContentOwner (boolean). March 16, 2017 The AdPerformanceReports was enhanced to support more combinations of columns to query. January 16, 2017 General release