YouTube_Subscribe_Button_-_YouTube_—_Google_Developers

A new favorite, the YouTube Subscribe Button

YouTube recently released the Subscribe Button that can be used on websites directly. If you are like me and have a website for your YouTube channel you can benefit from enabling people to subscribe to your channel without ever leaving your website.

How does it work?

Two lines of code are used to generate this button:

The First one is the javascript plusone.js include being called from Google’s servers. Since most websites now days are using social sharing links you may want to check the of your site to see if you are already  including plusone.js from Google. If not you can include it in the of your site.

The second line of code describes how the button will be rendered, I’ll go over this below.

The Subscribe Button

Google makes it easy with the help of their YouTube Subscribe Button page.
On this page you can create three different buttons in two different colors

Default Layout, Default Color:


<div class="g-ytsubscribe" data-channel="WPwatercooler" data-layout="default"></div>


Default Layout, Dark Color:


<div class="g-ytsubscribe" data-channel="WPwatercooler" data-layout="default" data-theme="dark"></div>


Full Layout, Default Color:


<div class="g-ytsubscribe" data-channel="WPwatercooler" data-layout="full"></div>


Full Layout, Dark Color:


<div class="g-ytsubscribe" data-channel="WPwatercooler" data-layout="full" data-theme="dark"></div>


Rules and limitations of use

YouTube states the following rules regarding using this button on your website.

  • You may not offer or promote prizes or rewards of any kind in exchange for clicking on a YouTube Subscribe button.
  • Buttons must be fully and clearly visible.
  • You may not use a Subscribe Button to track any data about a user related to the user’s actions or browsing activity, including without limitation whether or not a user clicks on a YouTube Subscribe button. This prohibition includes but is not limited to using pixels, cookies, or other methods of recognizing when a user clicks on a YouTube button.

 

Jason Tucker

Jason Tucker

Web Developer at Tucker.Pro
Jason brings 15+ years of hands-on experience as a web developer and systems administrator at large corporations and businesses in the fields of healthcare, manufacturing, technology and entertainment. Specializing in PHP coded sites utilizing WordPress. Jason owns and operates Tucker.Pro a WordPress web development company in Whittier, CA. He is also the host of WPwatercooler a weekly WordPress YouTube show and podcast
Jason Tucker
Jason Tucker
Jason Tucker

1 Comment

  1. […] has a new Subscribe button. +Jason Tucker has an excellent post with code for it on his WP Media Pro site, along with the rules of using it. What’s not covered is all of the […]

Leave a Comment

You must be logged in to post a comment.