Client asked me to track Prezi in Google Analytics. However, there is no way how to track iframe embed. Thus I had to use Prezi API to make this running. API is only alfa right now but I hope this basic function will work for a long time. I used Google Tag Manager to make this running.
You can try everything at prezidemo.marketingmakers.net
1. Use api to embed Prezi in the page
You can find all neccessary documentation on Github. This is a code that will place video in the page.
Update 30.6.2017: As of the update in March/April this solution does not work 100%. Unfortunatelly, I do not have a capacity to fix this. If you have, I will help you with the task.
<script src="http://prezi.github.io/prezi-player/lib/PreziPlayer/prezi_player.js"> </script><script> var player = new PreziPlayer('prezi_here', { preziId: 'l3qa8ydbj1l7', width: 620, height: 444, explorable: false, controls: true }); </script>
2. Push event to dataLayer on every slide of a Prezi
I push name of the Prezi presentation and step (slide).
player.on(PreziPlayer.EVENT_CURRENT_STEP, function(e) { dataLayer.push({ 'event': 'trackprezi', 'name': player.getTitle(), 'step': player.getCurrentStep() }) });
3. Create tag in Google Tag Manager that fires when trackprezi happens
Create dataLayer variables
and then create tag Google Analytics – Event.
This tag should fire when trackprezi happens.
This is it! Go to Behaviour -> Events in Google Analytics and enjoy your data!