YouTube Analytics Reader
Note
This adapter is in preview and is available on Striim Developer only. See Striim Developer for more information.
The YouTube Analytics Reader is a fully managed connector that allows for easy data extraction and replication of YouTube metrics. It treats YouTube like a traditional database, abstracting away the complexities of obtaining YouTube Analytics data and making it an easy-to-integrate solution.
With the YouTube Analytics Reader, your business can effortlessly channel YouTube analytics data into your CRM, marketing automation, and analytics systems in real-time, driving better insights and enhanced reporting.
Feature summary
Feature | Supported? | Notes | |
---|---|---|---|
Objects | Standard objects | ✓ | |
Custom objects | ✓ | ||
Authentication | Basic authentication | Username and password | |
OAuth authentication | ✓ | Manual configuration based | |
Custom authentication methods | Not all methods may be supported | ||
Operations | Automated mode | ✓ | |
Initial load | ✓ | ||
Pull-based incremental load | ✓ | ||
Push-based incremental load | |||
Automated pipeline | |||
Governance | Connection profile | ||
Sherlock AI | |||
Sentinel AI | |||
Schema handling | Initial schema creation | ✓ | Works with supported targets |
Schema evolution | |||
Setup | Wizard template | ||
Flow Designer | ✓ | ||
Striim TQL | ✓ | ||
Runtime | Resilience/recovery | ✓ | Supported only for Incremental load. Recovers the data based on the provided incremental load marker. |
Parallel execution | |||
Metrics | ✓ | Standard metrics |
Supported authentication method
The Youtube Analytics Reader supports connecting to Youtube using OAuth authentication. Creating the connection requires registering an app in the Google API console and obtaining the OAuth client credentials, and generating an access token.
Registering an app and obtaining the OAuth client credentials
Log in to the Google API console.
Open the necessary project or create a new project.
From the main menu, select the API Manager.
Click Credentials > Create Credentials > OAuth Client Id > Web Application in the user consent flow.
In the Authorized Redirect URIs box, enter the URL where you want the user to land after they return with the token that verifies that they have granted access to your application. The Google API Console creates the custom application and displays the
OAuthClientId
andOAuthClientSecret
.Record the
OAuthClientId
andOAuthClientSecret
for later use.Click Library > YouTube Analytics API > Enable API.
Generating an access token
The base URI for the custom OAuth browser URL is https://accounts.google.com/o/oauth2/v2/auth
. Append to that base URI the following components:
The redirect URI specified for the OAuth Client ID created in the previous procedure.
?redirect_uri=http://localhost:9080
Additional required parameters.
&prompt=consent&response_type=code
The client ID.
&client_id=<clientID>.apps.googleusercontent.com
OAuth scopes for the refresh token.
&scope=https://www.googleapis.com/auth/youtube https://www.googleapis.com/auth/youtube.readonly https://www.googleapis.com/auth/youtubepartner https://www.googleapis.com/auth/yt-analytics-monetary.readonly https://www.googleapis.com/auth/yt-analytics.readonly https://www.googleapis.com/auth/youtube.force-ssl
Additional required parameters.
&access_type=offline
Navigate to the final URL, which redirects to the specified redirect URI. The redirect URI contains a code=<authorization code>&
segment. Note this code for future use.
In Postman, make a POST request to the address https://accounts.google.com/o/oauth2/token
, specifying the following parameters:
client_id: The client ID.
client_secret: The client secret.
grant_type:
authorization_code
redirect_uri: The redirect URI specified for the OAuth client ID.
code: The code string generated by the custom browser URL.
Postman returns an access token and refresh token. Note down this access token for configuring the Striim application.
Supported objects
The YouTube Analytics Reader support reading the following objects from Youtube:
Activities
AdPerformanceReports
AudienceRetention
Captions
Channels
ChannelSections
Comments
CommentThreads
Demographics
Devices
EngagementReports
GroupItems
Groups
Languages
OperatingSystems
PlayListItems
PlayLists
Regions
Subscriptions
TimeBasedReports
TopPlaylists
TopVideos
TrafficSources
UserActivityByCity
UserActivityByCountry
UserActivityByProvince
VideoAbuseReportReasons
VideoCategories
Videos
YouTube Analyitcs Reader properties
Property | Type | Default value | Notes |
---|---|---|---|
Access token | Password | The access token that is generated when connecting with your private app. | |
Channel ID | String | A unique identifier assigned to each YouTube channel. | |
Client ID | String | Client ID of the private app registered in the Google API console. You can find this value in the Cloud Console Clients page. | |
Client secret | Password | Client secret of the private app registered in the Google API console. | |
Connection pool size | Integer | 20 | Specifies the maximum number of active connections. |
Content owner ID | String | A unique identifier that YouTube assigns to a content owner to track the rights and management of content. | |
Exclude tables | String | A list of tables excluded from read operations. Typically used to create a list of exceptions when the Tables property includes wildcards. Misconfiguration of the Tables and Exclude Tables properties can cause "Invalid table names" errors. | |
Incremental load marker | String | The incremental load marker is a unique incremental column in each object used for incremental load. When no marker is specified, tables are resynced at each polling interval. Specify the name of the column that contains the start position value. This column must meet the following criteria:
| |
Migrate schema | Boolean | False | Only available in Initial Load or Automated mode. Set to |
Mode | Select list:
| Automated | Automated mode applies incremental updates to objects that support incremental load and performs full resyncs for objects that do not support incremental load. |
Polling interval | Integer | 5m | Specifies an interval as an integer followed by a unit. Supported units are days ( |
Refresh token | Password | An OAuth 2.0 refresh token.Use the value generated while creating the token. | |
Start Position | String | %=-1 | Value of the incremental load marker that defines the initial reading position. |
Tables | String | A semicolon-delimited (;) list of objects to read from the source. Supports the | |
Thread pool count | Integer | 10 | The number of parallel running threads. The default value of zero specifies single-threaded operation. When the value of the thread pool counter is higher than the connection pool size, large data ingestion operations can cause the app to halt. Since best performance is achieved when using one thread for each table being synced, increasing the size of the connection pool to match the number of threads in use is a performance best practice. |