Information Technology Reference
In-Depth Information
version 5
<script language=”Javascript”>
function recordsale(orderid, amount) {
var YWATracker = YWA.getTracker(“1000123xxxx”);
YWATracker.setAction(“01“);
YWATracker.setOrderId(orderid);
YWATracker.setAmount(amount);
YWATracker.submit_action();
}
</script>
the wrapper function idea is also possible when using Flash, and is typically
something you would use if you need to inflate dynamic variables on the fly. It is pos-
sible to refer to the relevant function on the preceding Html page and pass variables
to this function, in the same way that we reference the version 4 javascript:__IT.page .
A typical example is when we only want to record an action.
In such a case we can add a getURL like the following to our Flash FlA file,
which calls a wrapper function named newwrap :
119
getURL(“javascript:newwrap.newpage(\”07\“)“);
this line of code passes the number 7 to the function on the referrer Html
page, located after the Javascript file, which then sets the action only and does not reg-
ister a full-page view:
FLA
FLA files contain source material for the Flash application. Flash authoring software can edit FLA
files and compile them into SWF files.
version 4
<script type=”text/javascript”>
var _s_itt=createITT();
_s_itt.ol();
_s_itt._submit();
var __newwrap=_s_itt;
ITT.prototype.newpage=function(action)
{
this.ACTION=action;
this.submit_action();
}
</script>
Search WWH ::




Custom Search