The YouTube Subscribe Button lets you add a one-click
Subscribe button to any page. The button lets people subscribe to your YouTube channel without having to leave your site to either log in to YouTube or confirm their subscriptions.
You can add a button by using an element, such as a
<div>, that sets its
g-ytsubscribe and uses other attributes to customize the button. The code below shows a simple integration that displays a
Subscribe button for the GoogleDevelopers channel.
<script src="https://apis.google.com/js/platform.js"></script> <div class="g-ytsubscribe" data-channel="GoogleDevelopers"></div>
Note: If the channel associated with the button is a paid subscription channel, the button links to the channel rather than subscribing users automatically.
The buttons below show different layout and configuration options for subscription buttons. Buttons for standard channels are shown with and without subscriber counts.
The button language defaults to the user's language settings or is set based on the user's location for logged-out users.