title: How can I track a click event of an embedded video (youtube, vimeo, etc.)? (to track play count)
body: <p>Is there a way to track play counts for embedded videos?  Ideally without resorting to a thumbnail linked to launch the embed / iframe code.</p>
  
  <p>Example (try it yourself on <a href="http://jsfiddle.net/BFnvV/" rel="noreferrer">jsFiddle</a>):</p>
  
  <pre><code>&lt;!doctype html&gt;
  &lt;html lang="en"&gt;
  &lt;head&gt;
      &lt;meta charset="utf-8"&gt;
      &lt;title&gt;Example&lt;/title&gt;
      &lt;script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"&gt;&lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;div id="log"&gt;&lt;/div&gt;
      &lt;ul&gt;
          &lt;li class="video" id="video1"&gt;&lt;iframe width="480" height="390" src="http://www.youtube.com/embed/z6lL83wl31E" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;&lt;li&gt;
          &lt;li class="video" id="video2"&gt;&lt;iframe src="http://player.vimeo.com/video/28231570?title=0&amp;amp;byline=0&amp;amp;portrait=0" width="400" height="225" frameborder="0"&gt;&lt;/iframe&gt;&lt;/li&gt;
          &lt;li class="video" id="video3"&gt;&lt;embed flashVars="playerVars=autoPlay=no" src="http://www.metacafe.com/fplayer/3153323/the_three_stooges_minisode_beer_barrel_polecats_season_1_episode_0008.swf" width="440" height="248" wmode="transparent" allowFullScreen="true" allowScriptAccess="always" name="Metacafe_3153323" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"&gt;&lt;/embed&gt;&lt;/li&gt;
      &lt;/ul&gt;
      &lt;script&gt;
          /* Here's what I've tried so far: */
          $('.video').mouseover(function(){
              $('#log').html('Mouseover!');
              /*alert('Track mouseovers instead? Is this the best I can do?');*/
          });
          $('.video').mouseout(function(){
              $('#log').html('&amp;nbsp;');
          });
          $('.video').mousedown(function(){
              $('#log').html('Mousedown!');
              alert('mousedown');
              /* This will track mousedown events in embed objects (not iframes), but not allow the click event to pass through to object. */
          });
      &lt;/script&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>How can I track play counts for each of these videos?</p>