JDBC Driver for YouTube Analytics

Build 22.0.8462

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.

Table Specific Information

Select

By default, grouping is done by Device Type:

SELECT * FROM Devices

However, you can group views by other dimensions such as Operating System:

SELECT OperatingSystem, Views, EstimatedMinutesWatched FROM Devices
Notice that you cannot mix both Device Type and Operating System in the same query due to limitations in the YouTube Analytics API.

Select Rules

You can use the following tables to build other queries to Devices:

Devices for videos:

Dimensions Use exactly one deviceType,operatingSystem
Use 0 or more day,liveOrOnDemand,subscribedStatus,youtubeProduct
Metrics Use 1 or more views,estimatedMinutesWatched
Filter Use 0 or one country,province,continent,subContinent
Use 0 or one video,group
Use 0 or more operatingSystem,liveOrOnDemand,subscribedStatus,youtubeProduct

Device data for playlists:

Dimensions Use exactly one deviceType,operatingSystem
Use 0 or more day,subscribedStatus,youtubeProduct
Metrics Use 1 or more views,estimatedMinutesWatched,playlistStarts,viewsPerPlaylistStart,averageTimeInPlaylist
Filter Required isCurated=true
Use 0 or one country,province,continent,subContinent
Use 0 or one playlist,channel,group
Use 0 or more operatingSystem,subscribedStatus,youtubeProduct

Device data for content owners:

Dimensions Required deviceType
Use 0 or more day,liveOrOnDemand,subscribedStatus,youtubeProduct
Metrics Use 1 or more views,estimatedMinutesWatched
Filter Use exactly one video,channel,group
Use 0 or one country,province,continent,subContinent
Use 0 or more operatingSystem,liveOrOnDemand,subscribedStatus,youtubeProduct

Device data for content owner playlists:

Dimensions Required deviceType
Use 0 or more day,subscribedStatus,youtubeProduct
Metrics Use 1 or more views,estimatedMinutesWatched,playlistStarts,viewsPerPlaylistStart,averageTimeInPlaylist
Filters Required isCurated=true
Use 0 or one country,province,continent,subContinent
Use 0 or one playlist,channel,group
Use 0 or more operatingSystem,subscribedStatus,youtubeProduct

Columns

Name Type Dimension DefaultMetric DefaultDimension Description
Video String True The Id of a YouTube video.
Group String True (filter only) The Id of a YouTube Analytics group.
Channel String True (only used in content owner reports) The Id for a YouTube channel. The channel dimension is frequently used in content owner reports because those reports typically aggregate data for multiple channels.
Playlist String True The Id of a YouTube playlist.
Country String True The country associated with the metrics in the report row. The dimension value is a two-letter ISO-3166-1 country code, such as US, CN (China), or FR (France). The country code ZZ is used to report metrics for which YouTube could not identify the associated country.
Province String True The U.S. state or territory associated with the metrics in the report row. The dimension value is an ISO 3166-2 code that identifies a U.S. state or the District of Columbia, such as US-MI (Michigan) or US-TX (Texas). The province code US-ZZ is used to report metrics for which YouTube could not identify the associated U.S. state. If the Province column is specified, Country must be set to US in the WHERE clause.
Continent String True (filter only) A United Nations (U.N.) statistical region code: 002 Africa, 019 Americas (Northern America, Latin America, South America, and the Caribbean), 142 Asia, 150 Europe, 009 Oceania. This dimension can only be used to filter data.
SubContinent String True (filter only) A U.N. statistical region code that identifies a geographical subregion.
Day String True When you use this dimension, data in the report is aggregated on a daily basis and each row contains data for one day.
LiveOrOnDemand String True This dimension indicates whether the user activity metrics in the data row are associated with views of a live broadcast. Data for this dimension is available for dates beginning April 1, 2014. The allowed values are LIVE, ON_DEMAND.
SubscribedStatus String True This dimension indicates whether the user activity metrics in the data row are associated with viewers who were subscribed to the video or playlist channel. The allowed values are SUBSCRIBED, UNSUBSCRIBED. Note that the dimension value is accurate as of the time that the user activity occurs.
YoutubeProduct String True This dimension identifies the YouTube service on which the user activity occurred. Data for this dimension is available as of July 18, 2015. The allowed values are CORE, GAMING, KIDS, UNKNOWN.
DeviceType String True True This dimension identifies the physical form factor of the device on which the view occurred. The allowed values are DESKTOP, GAME_CONSOLE, MOBILE, TABLET, TV, UNKNOWN_PLATFORM.
OperatingSystem String True False This dimension identifies the software system of the device on which the view occurred. The allowed values are ANDROID, BADA, BLACKBERRY, DOCOMO, HIPTOP, IOS, LINUX, MACINTOSH, MEEGO, NINTENDO_3DS, OTHER, PLAYSTATION, PLAYSTATION_VITA, SMART_TV, SYMBIAN, WEBOS.
IsCurated Boolean True This filter indicates that the request is retrieving data about video views that occurred in the context of a playlist. This filter is required for any playlist report and its value must be set to 1.
ClaimedStatus String True (only used in content owner reports) This dimension lets you indicate that the result set will only contain metrics for claimed content. The allowed value is claimed.
UploaderType String True (only used in content owner reports) This dimension lets you indicate whether the result set will contain metrics for content uploaded by the specified content owner or content uploaded by third parties, such as user-uploaded videos. The allowed values are self and thirdParty.
Views Double False True The number of times that a video was viewed.
EstimatedMinutesWatched Double False True The number of minutes that users watched videos for the specified channel, content owner, video, or playlist.
PlaylistStarts Double False False The number of times that viewers initiated playback of a playlist.
ViewsPerPlaylistStart Double False False The average number of video views that occurred each time a playlist was initiated.
AverageTimeInPlaylist Double False False The estimated average amount of time, in minutes, that a viewer viewed videos in a playlist after the playlist was initiated.
StartDate Date Start date for fetching Analytics data.
EndDate Date End date for fetching Analytics data.

Pseudo-Columns

Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.

Name Type Description
Segments String Segments the data returned for your request. Either a SegmentId or a custom segment.

Copyright (c) 2023 CData Software, Inc. - All rights reserved.
Build 22.0.8462