Effortlessly Integrate YouTube Analytics into R
- Video/Playlist/Channel Stats
- Daily & Monthly Views
- Geographic & Demographic Insights
- Device & Traffic Details
- and so much more

FAQ
What is YTAnalytics?
YTAnalytics is an R package designed to help YouTube channels collect their analytics and bring them into R for deeper analysis & report creation.
How do I install YTAnalytics?
You can install YTAnalytics from CRAN with install.packages("YTAnalytics") or you can download the development version from GitHub using devtools::install_github("davisj95/YTAnalytics")
What kind of YouTube data can I retrieve with YTAnalytics?
YTAnalytics allows you to pull any analytics available through the YouTube Analytics API using the analytics_request function, but there are many other functions that are wrappers of analytics_request. To explore what is available check out ytanalytics.org for documentation and a guide to get started.
What setup is necessary to get started?
You need to create a project at cloud.console.google.com and enable the YouTube Data API and YouTube Analytics API. Under the “Data Access” section you’ll need to enable the “/auth/yt-analytics.readonly” and “/auth/youtube.readonly” scopes which allow you to read your youtube videos & their data as well as collect all the analytics you want. Because “/auth/youtube.readonly” is a sensitive scope you’ll need to create a desktop app client in the “Client” section to generate OAuth credentials. These credentials are what you put into youtube_oauth() when starting your script. More details can be found at ytanalytics.org or at the GitHub page.
