S3Bubble Support Forums
To stay up to date with the latest S3Bubble updates and tutorials please make sure you sign up to our YouTube Channel.
home › Forums › General Questions & Bugs › s3bubble and google tag manager
- This topic has 7 replies, 2 voices, and was last updated 8 years, 7 months ago by
drafizan.
-
AuthorPosts
-
-
March 7, 2017 at 6:00 am #29788
drafizan
Participantis there anyway i can put css ID on play and pause button. i need the ID to integrate with google tag manager
-
March 13, 2017 at 9:20 pm #29852
s3bubble
KeymasterHi drafizan,
Can you send a example?
Best Regards
Sam
-
March 17, 2017 at 3:45 am #29875
drafizan
Participantthis is example for youtube. extracted from https://www.thyngster.com/measure-your-videos-engagement-with-google-analytics/
<script src=”http://www.google.com/jsapi” type=”text/javascript”></script> <script type=”text/javascript”> google.load(“swfobject”, “2.1”); </script> <script type=”text/javascript”> function updateHTML(elmId, value) { document.getElementById(elmId).innerHTML = value; } function onPlayerError(errorCode) { alert(“An error occured of type:” + errorCode); } function onPlayerStateChange(newState) { updateHTML(“playerState”, newState); } function updatePlayerInfo() { var percent = “cargado”; if(ytplayer && ytplayer.getDuration) { if(Math.round((ytplayer.getCurrentTime()*100)/ytplayer.getDuration())>0) percent = ‘0’; if(Math.round((ytplayer.getCurrentTime()*100)/ytplayer.getDuration())>10) percent = ’10’; if(Math.round((ytplayer.getCurrentTime()*100)/ytplayer.getDuration())>20) percent = ’20’; if(Math.round((ytplayer.getCurrentTime()*100)/ytplayer.getDuration())>30) percent = ’30’; if(Math.round((ytplayer.getCurrentTime()*100)/ytplayer.getDuration())>40) percent = ’40’; if(Math.round((ytplayer.getCurrentTime()*100)/ytplayer.getDuration())>50) percent = ’50’; if(Math.round((ytplayer.getCurrentTime()*100)/ytplayer.getDuration())>60) percent = ’60’; if(Math.round((ytplayer.getCurrentTime()*100)/ytplayer.getDuration())>70) percent = ’70’; if(Math.round((ytplayer.getCurrentTime()*100)/ytplayer.getDuration())>80) percent = ’80’; if(Math.round((ytplayer.getCurrentTime()*100)/ytplayer.getDuration())>90) percent = ’90’; if(Math.round((ytplayer.getCurrentTime()*100)/ytplayer.getDuration())==100) percent = ‘100’; if(percent_tmp != percent) { _gaq.push([‘_trackEvent’, ‘Videos’, ‘Status’, percent]); percent_tmp = percent; } } } function onYouTubePlayerReady(playerId) { ytplayer = document.getElementById(“ytPlayer”); percent_tmp = -1; setInterval(updatePlayerInfo, 1000); updatePlayerInfo(); ytplayer.addEventListener(“onStateChange”, “onPlayerStateChange”); ytplayer.addEventListener(“onError”, “onPlayerError”); } function loadPlayer() { var videoID = “rfouqNtKtoQ” var params = { allowScriptAccess: “always” }; var atts = { id: “ytPlayer” }; swfobject.embedSWF(“http://www.youtube.com/v/” + videoID + “?version=3&enablejsapi=1&playerapiid=player1”, “videoDiv”, “480”, “295”, “9”, null, null, params, atts); } function _run() { loadPlayer(); } google.setOnLoadCallback(_run); </script> -
March 17, 2017 at 4:03 am #29876
drafizan
Participantat the end of the day, i need to know total hours/minutes played by my subscribers. that is the main objective that i want to achieve.
please let me know if you have any alternative to do so.
-
March 17, 2017 at 4:43 am #29877
drafizan
Participantmore detailed….it is something like this.
-
March 17, 2017 at 1:56 pm #29887
s3bubble
KeymasterHi drafizan,
You can track all your bandwidth user base etc from Cloudfront here is a video tutorial I have skipped to the relevant part let me know if this is what you mean.
Cloudfront in combination with Google Analytics should give you everything you need.
Best Regards
Sam
-
-
March 20, 2017 at 12:53 am #29910
drafizan
Participantthanks for the video Sam. but it can only track overall bandwidth usage. is there any way I can track each embedded file bandwidth usage? Thanks
-
March 27, 2017 at 4:34 am #29983
drafizan
Participantconsider this problem solved. i am using s3stat for detailed analytic data
-
-
AuthorPosts
- The forum ‘General Questions & Bugs’ is closed to new topics and replies.

