If you have a Vimeo video on your site then you would want to know, how many people are watching it and the video being tracked in real time.The problem is that these videos are hosted on another website, so technically you are just seeing your embedded video through a hole in your site with the video behind it.This means that you cannot track videos unless you have a script that communicates with Vimeo API. Luckily, Sander Heilbron has created a script that communicates with Vimeo API, so in this guide, I will walk you through this whole process.
Track Vimeo Videos with Google Analytics- Step by Step Process
Solution for Non-Wordpress Sites
If you are not using WordPress then there is another simpler way to upload the file without using the plugin.Upload the file on your website root directory in your hosting Account. You should see a file manager in your Cpanel where you can upload the file. Please make sure the path to the file is correct, otherwise, the script will not work.<script src=”http://www.example.com/folder-name/vimeo.ga.min.js”></script>
2.Call your code where your videos are embeddedDownload ‘Header & Footer‘ plugin and then insert this code on all pages.
3.Find a page where you have your Vimeo video.Paste your standard Vimeo default code:
<iframesrc="//player.vimeo.com/video/12345678"width="640"height="390" frameborder="0"webkitAllowFullScreenmozallowfullscreenallowFullScreen></iframe>Replace theVimeoVideo ID number: 122582838with your Vimeo video ID number.Now edit the “src=” code that will inform Vimeo that you want to get information from Vimeo API. The code will look like this:
<iframesrc="//player.vimeo.com/video/12345678?api=1&player_id=vimeo-player-1" id="vimeo-player-1"width="640"height="390"frameborder="0" data-progress="true"data-seek="true"data-bounce="true" webkitAllowFullScreenmozallowfullscreenallowFullScreen></iframe>