Engagement/Analytics/Webtrends/Tracking: Difference between revisions

Line 56: Line 56:
  <code>WebTrends.prototype.dcsET=function(){<br>&nbsp;&nbsp;var e=(navigator.appVersion.indexOf("MSIE")!=-1)?"click":"mousedown";<br>&nbsp;&nbsp;this.dcsBind(e,this.dcsDownload);<br>&nbsp;&nbsp;this.dcsBind("contextmenu",this.dcsRightClick);<br>&nbsp;&nbsp;this.dcsBind(e,<font color=red><b>this.dcsLinkTrack</b></font>);<br>}</code>
  <code>WebTrends.prototype.dcsET=function(){<br>&nbsp;&nbsp;var e=(navigator.appVersion.indexOf("MSIE")!=-1)?"click":"mousedown";<br>&nbsp;&nbsp;this.dcsBind(e,this.dcsDownload);<br>&nbsp;&nbsp;this.dcsBind("contextmenu",this.dcsRightClick);<br>&nbsp;&nbsp;this.dcsBind(e,<font color=red><b>this.dcsLinkTrack</b></font>);<br>}</code>


3.  Verify that automatic link tracking is turned in the inline script:


<code>&lt;script type="text/javascript" src="http://mozcom-cdn.mozilla.net/includes/min/min.js?g=js_stats"&gt;&lt;/script&gt;<br>&lt;script type="text/javascript"&gt;<br>//&lt;![CDATA[<br>var _tag=new WebTrends({"dcsid":"dcst2y3n900000gohmphe66rf_3o6x","rate":5,"fpcdom":"mozilla.org"});<br>_tag.dcsGetId();<br>//]]&gt;<br>&lt;/script&gt;<br>&lt;script&gt;<br>//&lt;![CDATA[<br><font color=red><b>_tag.trackevents=true</b></font>;<br>_tag.dcsCollect();<br>//]]&gt;<br>&lt;/script&gt;</code>


3.  Add the following mark-up to reference the video:
4.  Add the following mark-up to reference the video:


  <code>&lt;div id="video-player" class="mozilla-video-control"&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&lt;video<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color=orange ><b>id="video"</b></font><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;width="640"<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;height="360"<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;controls="controls" preload="metadata"<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;poster="/img/covehead/video/poster-brand.jpg"<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;src="http://videos-cdn.mozilla.net/your_video.webm"&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&lt;/video&gt;<br>&lt;/div&gt;</code>
  <code>&lt;div <font color=red><b>id="video-player"</b></font> class="mozilla-video-control"&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&lt;video<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<font color=red ><b>id="video"</b></font><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;width="640"<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;height="360"<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;controls="controls" preload="metadata"<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;poster="/img/covehead/video/poster-brand.jpg"<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;src="http://videos-cdn.mozilla.net/your_video.webm"&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&lt;/video&gt;<br>&lt;/div&gt;</code>
 
Notice that the id of the div tag is highlighted.  This is required the reporting engine can differentiate a video play from other type of events.  It must always be set to <b>video-player</b>.  Also, the id value in the video tag should designate the name of the video.  This will allow Webtrends to distinguish it from other videos on your site.


== DCS Tracking: How to Create a Report  ==
== DCS Tracking: How to Create a Report  ==
165

edits