Technology and life
Tracking Flash ActionScript3 with YWA
At Astrups.com we use Yahoo! Web Analytics as our main tracking tool, and lately we have come across some problems using the trackingcode given in the YWA documentation for tracking inside flash objects. The problem was that the code in the documentation was designed for ActionScript2. Thanks to Fred @ Eyego we got to solve this issue using this codes:
At the top of the ActionScript you need to put this code(In a as class it have to be inside the classdefinition, if it is a timeline script it will need to be on the top of every script that uses the tracking, it is not enough to just put it on the root):
import flash.external.ExternalInterface;
If the page is using the YWA v5 tracking codes you may now add this code inside the ActionScript to track elements:
ExternalInterface.call("YWATracker.page(\"PageTitle\",\"DocumentGroup\",\"Member ID\",\"Action\",\"Amount\")");
Or if the page still is using the YWA v4 code you will need to use this code:
ExternalInterface.call("__IT.page(\"PageTitle\",\"DocumentGroup\",\"Member ID\",\"Action\",\"Amount\")");
| Print article | This entry was posted by Jon Espen Nergård on March 13, 2010 at 12:52, and is filed under Tracking. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site. |
