-
We are using the following code to track video views to our own database. On one page however, we have several different videos. How do you target those different videos? Is it by adding a class to a div or is there a setting in the shortcode to add?
Do we need to use the ‘each’ function in Jquery to make this happen? Any help is appreciated.
Here is our code:
jQuery('.flowplayer').on('fv_track_start ', function(e,api,video_name) { var tracking = { "post_id" : <?php echo get_the_ID(); ?> "video_name" : video_name, }; jQuery.ajax({ data: tracking, type: 'POST', url: 'https://domain.com/video_tracking.php', }); } );