ID #1039
How do I setup the clickTAG for FLASH Ads?
Your FLASH ads should not use a static link for the click button, it should use clickTAG parameter, which is an industry-standard for click tracking. clickTAG is used across all ad servers to track clicks of FLASH ads. You will be required to provide your destination URL when setting up your Flash ad.
Original ActionScript 2 code for the button instance should be something like this:
on (release) {
getURL("http://www.yoursite.com/","_top");
} |
ClickTAG parameter code for ActionScript 2, should look like:
on (release) {
if (clickTAG.substr(0,5) == "http:") {
getURL(clickTAG, "_blank");
}
} |
ClickTAG parameter code for ActionScript 3, should look like:
|
MyClickButton.addEventListener(
MouseEvent.CLICK,
function():void {
if (root.loaderInfo.parameters.clickTAG.substr(0,4) == "http") {
navigateToURL(
new URLRequest(root.loaderInfo.parameters.clickTAG),
root.loaderInfo.parameters.TargetAS
);
}
}
);
|
In the above short sample code, MyClickButton represents whatever instance name you chose for your button symbol. If you actually used MyClickButton, you are done; otherwise, change the above code to match the instance name.
If you would like more technical details, please review the official instructions from Adobe.
Tags: clickTAG, Flash
Related entries:
5273/3%Last update: 2012-05-02 13:10
Author: Ida
Revision: 1.7
You cannot comment on this entry