YouTube Analytics

YouTube Analytics

Let AI connect your sources for you

Skip the manual setup — run this in your project and the wizard auto-detects your databases and APIs and connects them to PostHog.

Learn more
PostHog Wizard hedgehog

Connect YouTube Analytics to PostHog to sync your data into the PostHog data warehouse for analysis and modeling.

Pull daily channel metrics from the YouTube Analytics API: views, watch time, subscribers, traffic sources, geography and demographics.

Connect the Google account that manages your channel, then pick the channel to sync. PostHog asks for read-only access to your YouTube Analytics reports and your list of channels.

Configuration

OptionTypeRequired
Google accountoauthYes
Channeloauth-account-selectYes
Start datetextNo

Linking YouTube Analytics to PostHog

  1. Go to the Data pipeline page in PostHog
  2. Click New source and select YouTube Analytics
  3. Fill in the required configuration fields
  4. Click Next, select the tables you want to sync, and then press Import

Supported tables

TableDescriptionSync methodIncremental fieldPrimary key
channel_daily

Daily channel-level user activity: views, watch time, engagement and subscriber changes.

Incremental, Full refreshdayday
top_videos

The channel's top videos for each day, ranked by watch time (up to 200 videos per day).

Incremental, Full refreshdayday, video
traffic_sources

Daily views and watch time broken down by the referrer type that led viewers to the videos.

Incremental, Full refreshdayday, insightTrafficSourceType
playback_locations

Daily views and watch time broken down by the type of page or application where playback occurred.

Incremental, Full refreshdayday, insightPlaybackLocationType
device_types

Daily views and watch time broken down by the form factor of the device used for playback.

Incremental, Full refreshdayday, deviceType
operating_systems

Daily views and watch time broken down by the operating system of the playback device.

Incremental, Full refreshdayday, operatingSystem
geography

Daily views, watch time and subscriber changes broken down by viewer country.

Incremental, Full refreshdayday, country
demographics

Daily viewer distribution across age group and gender, for signed-in viewers only.

Incremental, Full refreshdayday, ageGroup, gender
sharing_services

Daily share counts broken down by the service videos were shared to.

Incremental, Full refreshdayday, sharingService
subscribed_status

Daily views and watch time split by whether the viewer was subscribed to the channel.

Incremental, Full refreshdayday, subscribedStatus