Tag Archives: youtube

The second largest search engine isn’t Bing or Yahoo

It’s YouTube. Many people know this, some people don’t. But regardless, now that they’ve launched some great new features (and if you’re like us), it’s time to get started taking video more seriously.

Step 1. Get the new YouTube interface. You can simply go to your channel and you should be prompted to check it out.

Step 2. Get videos.

I know, right? Seems simple but many people think this is a lot harder than it is. Where do you begin? Product videos? Sure, those are good. But there may be more videos out there that your users or customers may have already created for you.

So why not leverage it? There are tons of PunchTab videos on YouTube and all we have to do is add them to our favorites so anyone viewing our channel can see them.

If the goal is to create awareness, then the more content out there about you the better. So don’t fight it, use it!

User generated videos are also great. Run a giveaway with PunchTab asking people to create videos and paste them in a link in the comments section. If you’re using Facebook comments on your blog, you’ll get even more reach because your users networks will also be able to like and comment on the videos they’ve just shared.

Step 3. Reward people for visiting your YouTube channel. 

I bet you didn’t know that you can award points for visiting your YouTube channel. Here’s how:

In a typical page you may have a button or a link that say: Check us out on YouTube. And your HTML may look like:

<a href="http://www.youtube.com/user/punchtab"> Check us out on YouTube!</a> 

All you need to to is add the code in red:

<a href="http://www.youtube.com/user/punchtab" onClick='_ptq.push(["view",{"points":10}]);'> Check us out on YouTube! </a> 
So, how 'bout you see it in action and actually check out our YouTube channel?

Step 4. Leverage all those great videos on your site and reward-enable them.

Our founder, Ranjith, created a couple of blog posts on this. Read the post, get the code and see a demo of it.

Reward users for watching videos on your site (The easy version)

We received a lot of good feedback about our last post on rewarding users for viewing YouTube videos. One common request was how to use the standard YouTube player instead of the (chromeless) custom player. In this example the standard player is used but the viewer must watch the entire video, start to finish, in order to get points (in the previous example you could set a minumum viewing time). The good news is that this makes the code much simpler.

Here’s a link to the demo (earn 100 points by watching the entire video!) and the full code is below.

<html>
<head>
  <title>Simple YouTube demo</title>
</head>
<body>
  <h1>Reward users for watching YouTube videos with PunchTab</h1>
  <p>Watch the entire video and earn 100 points!</p>
  <!-- embed the player --!>
  <div id="ytplayer"></div>

  <!-- include YouTube library --!>
  <script src="https://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js"></script>
<script>
  // numstarts tracks how many times video was started (including skips)
  var numstarts = 0;
  function onYouTubePlayerReady(playerId) {
    ytplayer = document.getElementById("ytplayer");
    ytplayer.addEventListener('onStateChange', 'stateChange');
  }
  function embedYouTubePlayer(videoID, containerID, width, height) {
    swfobject.embedSWF('http://www.youtube.com/e/' + videoID + '?enablejsapi=1&playerapiid=ytplayer&rel=0', containerID, width, height, '8', null, null, { allowScriptAccess: 'always' }, { id: containerID });
  }
  function stateChange(state) {
    switch(state) {
      case 0:
      // Video ended
        if(numstarts == 1) // user started video just once
          _ptq.push(["watch",{'points':100}]);
        // clear numstarts in case user wants to try again
        numstarts = 0;
        break;
      case 1:
      // Video started, skips will be registered as additional starts
        numstarts += 1;
        break;
    }
  }
  // change video id below to your own
  embedYouTubePlayer('nUoP0lMW1fw', 'ytplayer', 425, 356);
</script>

<!-- PunchTab code --!>
<script type="text/javascript" charset="utf-8">
  var _ptq = _ptq || [];
  var _punchtab_settings = {
    key: "YOURKEYHERE",
    display: "tab",
    position: {x:"right", y:"bottom"}
  };

  (function() {
    var pt = document.createElement('script'); pt.type = 'text/javascript'; pt.async = true;
    pt.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'static.punchtab.com/js/pt.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(pt, s);
  })();
</script>
</body>
</html>