11/22/2023 0 Comments Vimeo to youtubeThis code sample is provided as-is as a reference and is not maintained by Optimizely. Please keep in mind that these code samples are presented as is, and are not maintained or supported by Optimizely Web Experimentation. The code samples in the below section should give your developers a better idea of how a real video tracking implementation looks. Includes an Optimizely Web Experimentation custom event that is pushed each time one of the player callback functions is executed.Īfter the code is verified and implemented, add the necessary video tracking events to your project's implementation settings as custom events. (4) Add as many chapters to your video as you’d like. (3) Enter a title and timestamp for when and where you want your new chapter to be placed. (2) Under the Chapters section click + New. Your developer will need to determine how to add API access to your embedded video either by using Optimizely Web Experimentation or by adding code to your site itself.Īfter your video vendor’s API is added to the page where you’ve embedded your video, your developers must write a script that:Ĭreates an object that identifies the embedded video player on the page.ĭefines a set of callback functions that executes when a visitor performs an action such as playing, pausing, or completing a video. Here are the steps that you’ll need to follow: (1) Head to the Interaction tools tab of your video’s settings. YouTube requires that you add a query parameter to your embed URL: /iframe> bind the event to the callback function. Var script = document.createElement('script') Var head = document.getElementsByTagName('head') this is a boilerplate function to append a new script to your head tag For example, Vimeo requires you to create a player object on the page where you’ve embedded your video: /* _optimizely_evaluate=force */ Most of these vendors do not provide access to their APIs by default when a video is embedded. YouTube Player API Reference for iframe Embeds Here's where to find the documentation for a few common video hosting providers: Your vendor’s developer documentation will explain which functions are available from their API. First, determine what video vendor your site uses.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |