If you run a YouTube channel and want to display it’s subscriber count on your personal blog or a website, there is a very simple way of doing it. All you need is to paste a 2 line code inside your display wrapper. This might be the quickest way to display Subscriber count on any website and plus you do not need to register any API key for this.
Follow mentioned steps:
- Open your YouTube channel and get it’s Channel ID (visible on URL bar)
- For ex: https://www.youtube.com/channel/UCg09tk_YFpK-vzQicr3nN5Q (it could be like Techplayce or in my case: “UCg09tk_YFpK-vzQicr3nN5Q”
- Now go to this website: https://developers.google.com/youtube/youtube_subscribe_button
- Add your channel ID as shown in below image
- Choose your configurations from the next line options.
- Once done, you would see the embed code for displaying YouTube Subscriber count on your website.
<script src="https://apis.google.com/js/platform.js"></script>
<div class="g-ytsubscribe" data-channelid="UCg09tk_YFpK-vzQicr3nN5Q" data-layout="full" data-count="default"></div>