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
- Connecting to the YouTube Analytics REST API
- Adding YouTube Analytics Tables to your ElastiCube
- YouTube Analytics Tables
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:
- Download the YouTube Analytics installation file.
- Open the installation file and click Install.
- After the installation process is complete, click Close.
The YouTube Analytics connector is displayed in the ElastiCube Manager under Add Data > Web Services.
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:
- Log in to the Google API Console.
- Select a project or create a new one.
- In the API Manager menu, click Credentials > Create Credentials > OAuth Client Id > Other.
- Click Create. The OAuthClientId and OAuthClientSecret are displayed.
- 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.
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:
- In ElastiCube Manager, click Add Data and then, YouTube Analytics. The Connect to YouTube Analytics window is displayed.
- In Datasource Connection String, enter your connection string.
- Click Connect to Server. YouTube Analytics is displayed in the Select Database list.
- Click OK. Sisense connects to YouTube Analytics and displays a list of tables available for you to import.
- Select the relevant tables and click Add.
The tables are displayed in the ElastiCube Manager.
The Sisense YouTube Analytics connector allows you to import the following tables into the ElastiCube Manager.
|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, 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):
|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.|
|TrafficSources||Query TrafficSources. Statistics are based on the manner in which viewers reached your video and playlist content.|
|18.104.22.168||March 16, 2017||The AdPerformanceReports was enhanced to support more combinations of columns to query.|
|22.214.171.124||January 16, 2017||General release|
Hey! Was this article helpful?
Questions? Ask the community.