--- title: "YouTube" slug: "youtube" updated: 2020-05-06T16:33:29Z published: 2020-05-06T16:33:29Z canonical: "onpremises.webtrends.help/youtube" --- > ## Documentation Index > Fetch the complete documentation index at: https://onpremises.webtrends.help/llms.txt > Use this file to discover all available pages before exploring further. # YouTube The YouTube plugin captures data about YouTube videos embedded on a web page, such as plays, pauses, and percentage viewed. The OnPremises product currently does not have any out of the box reports on YouTube, but custom reports can be created. ## Events tracked by the YouTube plugin **Impression events** An event is sent when a page with an embedded YouTube video loads. One event per embedded video is sent. **Action events** Events are sent when a visitor plays, pauses, resumes, finishes, or selects a frame in a video. **Progress events** Events are sent when a visitor passes the 25%, 50% and 75% milestones in a video. (The Action events for play and finish represent 0% and 100% progress, respectively.) ## Adding the YouTube plugin You must have the Webtrends Javascript tag version 10.2 to use the YouTube plugin. Add the plugin using this code: ``` window.webtrendsAsyncInit=function(){ var dcs=new Webtrends.dcs().init({ dcsid:"YOUR_WEBTRENDS_DCSID_HERE" ,timezone:YOUR_TIMEZONE_HERE ,plugins:{ yt:{ //required src:"//s.webtrends.com/js/webtrends.yt.js", //optional mode: "manual", dcsid: "YOUR_WEBTRENDS_YOUTUBE_DCSID" } } }).track(); }; ``` ## Enabling necessary APIs Do one of the following: **Enabling the YouTube JavaScript Player API** Add the `enablejsapi=1` option to the query string of the video URL. Note For more information on enabling the YouTube Javascript API, see: [YouTube JavaScript Player API Reference](https://developers.google.com/youtube/iframe_api_reference) **Enabling the YouTube Player API for iframe Embeds** See the [Getting Started section](https://developers.google.com/youtube/iframe_api_reference#Getting_Started) in YouTube Player API Reference for