3

I am integrating Facebook video in my webpage. It is working fine, Now I what to detect when user click on play button.

Can any one help me to figure out ?

Below is my code of html page

<body  id="mainbody">
<div id="fb-root"></div>
<script>(function(d, s, id) {
  var js, fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) return;
  js = d.createElement(s); js.id = id;
  js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.4";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>

<div class="fb-video" data-href="https://www.facebook.com/facebook/videos/10153231379946729/" data-width="500"><div class="fb-xfbml-parse-ignore"><blockquote cite="https://www.facebook.com/facebook/videos/10153231379946729/"><a href="https://www.facebook.com/facebook/videos/10153231379946729/">How to Share With Just Friends</a><p>How to share with just friends.</p>Posted by <a href="https://www.facebook.com/facebook">Facebook</a> on Friday, December 5, 2014</blockquote></div></div>

</body>
Anupam Sharma
  • 1,529
  • 1
  • 14
  • 33
  • 1
    possible duplicate of [Detect Click into Iframe using JavaScript](http://stackoverflow.com/questions/2381336/detect-click-into-iframe-using-javascript) – KittMedia Jul 15 '15 at 13:33
  • Look here: http://stackoverflow.com/questions/2381336/detect-click-into-iframe-using-javascript/23231136#23231136 You just can select the iframe as element but no element inside the iframe. – KittMedia Jul 15 '15 at 13:34
  • You want to trigger some pop-up? or you're trying to count how many video views? – VC.One Jul 15 '15 at 16:47

1 Answers1

0

You can use Google Analytics' "Event Tracking" for embedded video as well. Go to this link for more information

masmrdrr
  • 559
  • 3
  • 14