YouTube Owner Analytics
Sign in with the Google account that owns your channel to see views, watch time, subscribers, traffic, audience and revenue.
http://localhost:8000 or upload it to your website, then open it from there.How to get a Client ID
- In Google Cloud Console, open APIs & Services, Library, and enable YouTube Analytics API and YouTube Data API v3.
- Open the OAuth consent screen, choose External, fill in an app name and your email, and add your Google account as a Test user.
- Open Credentials, Create credentials, OAuth client ID, type Web application.
- Under Authorized JavaScript origins add this page's address:
- Copy the Client ID and paste it above. No secret or redirect URI is needed.
Insights
Views per day
Traffic sources
Net subscribers per day
Video drill-down
Views per day
Audience retention
Compare with other channels
What this tool can do
Sign in with the Google account that owns the channel. On later visits the page signs you in again without asking, when the browser allows it.
Views, watch time, average view duration, net subscribers, likes, comments, shares, dislikes and playlist adds, each compared with the previous period.
Automatic notes on trends, best day, engagement, subscriber gain, top traffic source, Shorts share, best weekday and publishing pace.
Type a target and see roughly how many days and which date you reach it at your current pace.
Views per day, net subscribers per day and a traffic source breakdown.
Top countries, US states, age and gender, devices, operating systems, and subscribers versus non-subscribers.
Traffic sources, YouTube search terms, external websites, playback locations and sharing services.
Top videos by views, by watch time and retention, and by subscribers gained. Also content type (Shorts, videos, live), playlists and recent uploads.
Pick any of your videos for its own scorecards, daily views, audience retention curve with the biggest drop-off, traffic, countries, search terms and demographics.
Last 7, 28, 90 or 365 days, or any start and end date you choose.
Your latest comments with links, and your recent public subscribers.
Estimated revenue, CPM, ad impressions, revenue by country, top earning videos and ad type performance for monetized channels.
Compare your channel with other channels using public numbers: subscribers, views, videos and views per video.
Text report, daily CSV, Excel workbook with a sheet per table, a per-video report, and print or save as PDF.
No server and no database. Your browser talks directly to Google, and read-only permissions are requested.
1. Overview
YouTube Owner Analytics is a single HTML page that reads your own channel's private analytics from Google and shows them as one dashboard. It is meant for channel owners and managers who want more detail in one place than a single YouTube Studio screen gives.
The page runs entirely in your browser. After you sign in, it sends requests straight to the YouTube Analytics API and the YouTube Data API using your permission, and draws the results. Nothing is stored on a server.
2. What you need
- A Google account that owns or manages the YouTube channel.
- A Google Cloud project with YouTube Analytics API and YouTube Data API v3 enabled.
- An OAuth Client ID of type Web application.
- A web address to open the page from: your own HTTPS website, or
http://localhost:8000for testing. Google does not allow sign-in from a file opened by double-click (file://). - A modern browser such as Chrome or Edge, and an internet connection (the page loads Google sign-in, Chart.js and the Excel library from the internet).
3. Setup, step by step
- Open Google Cloud Console and select or create a project.
- Go to APIs & Services, then Library. Enable YouTube Analytics API and YouTube Data API v3.
- Open the OAuth consent screen (in newer layouts, Google Auth Platform). Choose External, enter an app name and your email, and under Test users add the Google account that owns the channel.
- Go to Credentials, Create credentials, OAuth client ID, and choose Web application.
- Under Authorized JavaScript origins, add only the site address, for example
https://learn.example.com. Do not include a file name or path and do not end with a slash. Leave redirect URIs empty. - Create the client and copy the Client ID (it ends with
.apps.googleusercontent.com). - Upload this HTML file to that site, or run
python -m http.server 8000in its folder and openhttp://localhost:8000/youtube-owner-analytics.html. If you use localhost, also addhttp://localhost:8000as an authorized origin. - Paste the Client ID, tick Include revenue only if your channel is monetized, and click Sign in with Google.
- On the "Google hasn't verified this app" screen, click Continue (this is normal for your own app in Testing mode), then approve the permissions.
Google can take 5 minutes to a few hours to apply new origins or settings.
4. Signing in, refreshing and signing out
- Sign in with Google: opens Google's account popup. Pick the account that owns the channel.
- Automatic sign-in: the page remembers your Client ID and that you signed in before. On the next visit it quietly asks Google for a new token. If the browser or Google needs you to interact, the page shows the sign-in button instead.
- Refresh: gets a fresh token and reloads all data. Tokens last about one hour, so press Refresh if you see "Invalid Credentials".
- Switch account: shows the account chooser again.
- Sign out: revokes the token and returns to this page.
- While your OAuth app is in Testing status, Google may ask you to approve again about every 7 days.
5. The dashboard, module by module
Toolbar
- Date range menu: 7, 28, 90 or 365 days, or Custom range with two date pickers and Apply.
- Refresh, Download report, Daily CSV, Excel export, Print / PDF, Help, Switch account, Sign out.
Insights and goal
A list of sentences worked out from the data already loaded, plus the subscriber goal box.
Scorecards
Totals for the chosen period. Percentages such as "+12% vs previous" compare with the same number of days immediately before the period.
Modules
| Module | What it shows | Data source |
|---|---|---|
| Traffic sources | Views and watch hours by where viewers came from | Analytics: insightTrafficSourceType |
| Subscribers vs non-subscribers | Views and watch hours split by subscription status | Analytics: subscribedStatus filter |
| Content type | Shorts, regular videos and live streams | Analytics: creatorContentType |
| Top videos | Top 10 by views with watch hours, average duration, likes, comments, subscribers gained | Analytics: video dimension |
| Top videos by watch time and retention | Top 10 by watch time with average percentage viewed | Analytics: averageViewPercentage |
| Top videos by subscribers gained | Which videos bring subscribers | Analytics: subscribersGained |
| Top playlists | Views, watch hours, starts, average time in playlist | Analytics: playlist dimension |
| Recent uploads | Last 20 uploads with date, views, likes, comments, length | Data API: playlistItems, videos |
| Top countries and US states | Views, watch hours, subscribers gained by location | Analytics: country, province |
| Devices and operating systems | Phone, TV, computer, and system split | Analytics: deviceType, operatingSystem |
| Playback locations | Watch page, embedded players and other places | Analytics: insightPlaybackLocationType |
| Sharing services | Where viewers share your videos | Analytics: sharingService |
| External websites | Websites that send views | Analytics: insightTrafficSourceDetail (external URL) |
| YouTube search terms | Search phrases that led to your videos | Analytics: insightTrafficSourceDetail (YouTube search) |
| Age and gender | Share of views by age group and gender | Analytics: viewerPercentage |
| Views by weekday | Total and average views for each day of the week | Calculated from the daily data |
| Latest comments | Latest 50 comments with author, likes, date and link | Data API: commentThreads |
| Recent subscribers | Subscribers who made their subscription public | Data API: subscriptions |
| Revenue tables | Revenue by country, top earning videos, ad type performance | Analytics: estimatedRevenue, adType (monetized channels) |
6. Insights and subscriber goal
Insights are plain sentences calculated in your browser from the data on screen. They cover period-over-period change in views, best day, start versus end of period trend, engagement per 100 views, subscribers gained per 1,000 views, biggest traffic source, share of views from existing subscribers, Shorts share, strongest weekday, top video share, top country and publishing pace.
The goal tracker divides net subscribers gained in the period by the number of days to get a daily pace, then estimates days and date to reach your target. It is a simple projection, not a forecast, and it is only as steady as the period you chose.
7. Video drill-down
- Choose one of your last 20 uploads, or paste a video link or ID (watch, youtu.be, Shorts and live links work).
- Click Analyze video. It uses the date range currently selected.
- Read the scorecards, the daily views chart and the retention curve. The note under the curve shows how many viewers remain at 10%, 25%, 50% and 75% of the video and where the biggest drop-off happens.
- Scroll for traffic sources, subscribers versus non-subscribers, countries, search terms and age and gender for that video.
- Click Download video report to save a text file for that video.
Only videos from the signed-in channel work. Retention can be empty for videos with very few views or very short periods.
8. Channel comparison
Enter up to 8 handles (such as @channelname), channel IDs or channel links, separated by commas, then click Compare. The table shows subscribers, total views, video count, views per video and join date, with your own channel first. It uses public numbers only. Subscriber counts are rounded by YouTube, and some channels hide them.
9. Revenue
Tick Include revenue before signing in. This asks for one extra read-only permission. Revenue cards and three revenue tables then appear. They work only for channels in the YouTube Partner Program. If you did not tick the box earlier, sign out, tick it, and sign in again. Revenue values are estimates in your account's currency.
10. Exports
- Download report (.txt): summary, insights and every table in plain text, with video links.
- Daily CSV: one row per day with views, watch minutes, average view duration, subscribers gained and lost, likes, comments and shares.
- Excel export (.xlsx): one sheet for the daily data, one for insights, and one per table, with numbers saved as numbers.
- Print / PDF: hides the controls so you can print or save the page as a PDF.
- Download video report: text file for the video you analyzed.
11. Data accuracy and limits
- YouTube delays analytics by about 2 days, so the newest period ends two days ago.
- Analytics days follow Pacific Time, so a day can differ slightly from YouTube Studio in your own time zone.
- Numbers may differ slightly from YouTube Studio because of rounding, spam filtering and later corrections.
- Only the signed-in channel's private analytics are available. Other channels can only be compared using public numbers.
- Private, deleted or unavailable videos can be missing from lists.
- Public subscriber counts are rounded, and recent subscribers lists include only people who made subscriptions public.
- Top lists show 10 to 15 rows. Comments show the latest 50.
12. Quota and performance
The YouTube Data API has a free daily quota of 10,000 units. A full dashboard load uses only a handful of units, and the Analytics API has its own, separate limits. A full load runs about 30 requests one after another, so it can take several seconds. A section that fails shows its own error and the others still load.
13. Privacy and security
- The page requests read-only permissions:
youtube.readonly,yt-analytics.readonly, and optionallyyt-analytics-monetary.readonly. - The access token stays in the page's memory and is not saved. Your Client ID, revenue choice, subscriber goal and a "signed in before" flag are saved in your browser's local storage.
- There is no server, tracking or database. Requests go from your browser directly to Google.
- You can remove access at any time with Sign out, or at myaccount.google.com under Security, Third-party access.
- The Client ID is not a secret, but do not share exported reports if they contain private business data.
14. Troubleshooting
| Message or symptom | Cause | Fix |
|---|---|---|
| "This page is open as a file" | The page was opened with a double-click (file://) | Upload it to your site or serve it from localhost and open it from there |
| Invalid Origin when creating the client | The origin includes a path or a trailing slash | Use only the address, for example https://learn.example.com |
| origin_mismatch | The page's address is not listed as an authorized origin | Add the exact origin (scheme and host, plus port for localhost) and wait a few minutes |
| Error 403: access_denied | Your account is not a Test user, or the app is not allowed | Add the account under Test users on the OAuth consent screen |
| "Google hasn't verified this app" | Normal for apps in Testing mode | Click Continue, then approve |
| Popup closed or blocked | Browser popup blocker | Allow popups for the site and click Sign in again |
| "Invalid Credentials" or a 401 error | The token expired after about an hour | Click Refresh or sign in again |
| 403 saying an API is not enabled | YouTube Analytics API or Data API is off in the project | Enable both under APIs & Services, Library |
| "An internal error has occurred" in one table | Google rejected that report for this channel or period | Try another date range; other sections are unaffected |
| Empty tables or "No data" | Too short a period, new videos, or no activity | Use a longer range such as 90 days |
| "No YouTube channel" message | The Google account has no channel | Use Switch account and choose the channel owner |
| Revenue shows unavailable | Channel not monetized, or the revenue permission was not given | Sign out, tick Include revenue, sign in again |
| Excel button says the library did not load | No internet access to the Excel library | Check your connection and reload |
| Failed to fetch | Network or ad blocker blocking Google requests, or a sandboxed preview | Open the page from your site or localhost and disable blocking extensions |
15. Glossary
- Views: counted views of your videos in the period.
- Watch time (hours): total time viewers spent watching.
- Average view duration: average time per view, in minutes and seconds.
- Average percentage viewed: how much of a video viewers watch on average.
- Net subscribers: subscribers gained minus subscribers lost.
- Retention: the share of viewers still watching at each point in a video.
- Engagement per 100 views: likes, comments and shares divided by views, times 100.
- CPM: estimated revenue per 1,000 ad impressions.
- Traffic source: where a view came from, such as suggested videos, search, subscribers or external sites.
- Estimated revenue: earnings estimate before final adjustments by YouTube.
16. Frequently asked questions
Can I see another channel's analytics?
No. Google only gives private analytics to the channel's owners. You can compare public numbers only.
Does it work for a brand account or a channel I manage?
Yes, if the Google account you sign in with has access to that channel's analytics. If the channel is under a brand account, sign in with the account that manages it.
Can several people use it?
Yes. Each person signs in with their own Google account, and each account must be listed as a Test user while the app is in Testing mode.
Why does it ask me to sign in again every week?
Apps in Testing mode have shorter approvals. Publishing the OAuth app removes this, but Google may then require verification because of the YouTube scopes.
Does it change anything on my channel?
No. All permissions are read-only.