-
I’m using the following code to track user engagement.
It was working fine but the latest version of Fvplayer breaks it and the Ajax is never sent.
Working fine once I roll back to 7.3.19.727
So the code below works fine in 7.3 but broken in 7.4
ideas? ty
<script>
jQuery(‘.flowplayer’).on(‘fv_track_start fv_track_first_quartile fv_track_second_quartile fv_track_third_quartile fv_track_complete’, function(e,api,video_name) {
console.log(‘tracking-working’);console.log(‘tracking’,e.type,video_name);
var tracking = {“post_id” : <?php echo get_the_ID(); ?>, “location” : e.type, “video_name” : video_name, “user_id” : <?php echo $user_id; ?>};jQuery.ajax({
data: tracking,
type: ‘POST’,
url: ‘https://website.com/ajax_je_video_tracking.php’,
});
} );</script>