Last active
October 25, 2019 23:57
-
-
Save WesleyDRobinson/423acd4d00843e2c7423 to your computer and use it in GitHub Desktop.
Segment interview question :)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
wistiaEmbed = document.getElementById(“YOUR_IFRAME_ID”).wistiaApi; | |
wistiaEmbed.bind('play', function () { | |
analytics.track('play', { | |
category: 'Video', | |
label: wistiaEmbed.name() | |
}); | |
}); | |
wistiaEmbed.bind('pause', function () { | |
analytics.track('pause', { | |
category: 'Video', | |
label: wistiaEmbed.name() | |
}); | |
}); | |
wistiaEmbed.bind('end', function () { | |
analytics.track('end', { | |
category: 'Video', | |
label: wistiaEmbed.name() | |
}); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment