Information Technology Reference
In-Depth Information
Before we get too specific, I would like to focus on one of the kPIs mentioned in
this post: online video Played, seconds. tracking this kPI takes a bit more than the
usual effort and involves adding another hack.
We can set a timer within the Flash file using Actionscript, and then report the
time spent watching the video each time the file is paused. In Actionscript 2, add the
following to the existing Actionscript onClipEvent functions:
on (playing) {
getURL(“javascript:timestart.timepage(\”07\”)”);
var timer1:Number = setInterval(getTime, 1000); // 1 second
timeViewed = 0;
function getTime():Void {timeViewed = timeViewed + getTimer();}
}
on (paused) {
getURL(“javascript:Pausedtime.newpage(\”“+timeViewed+”\”,\”12\”)”);
}
121
the second function passes the action, and then passes a value containing the
time spent watching the file to an action-based custom field.
In Actionscript 3, the timer is initialized differently:
function getTime(event:TimerEvent) {
timeViewed = timeViewed + getTimer();
}
var timer1:Timer = new Timer(1000);
timeViewed = 0;
timer1.addEventListener(TimerEvent.TIMER,getTime);
timer1.start();
the function getTime() can then be called when the video is paused. I am sur-
prised that the Flash framework, as the prominent web client video platform of choice
today, does not provide easier access to metrics like this, but I am sure this fact will
change over time.
Instrumentation for Ajax-Based Objects
the Internet changed from consisting mostly of static pages through the period known
as Web 1.0 to become the interactive environment known today as Web 2.0. Whether
we recognize that the Web has entered a new phase in its development does not mat-
ter too much, as I am sure we can all agree that users expect a much richer experience
using websites today. Websites are so interactive in nature that we might as well call
them applications, just as we would call microsoft Word an application.
Search WWH ::




Custom Search