ClickTags

What is clickTag?

To know how your banners are performing after you have released them into the world, you’ll need to track a couple of things. For instance, you’ll need to know how many people have clicked them and what site those people were actually on when they did so.

So how do you get this information? Whether your ads are hosted by the site on which they run or by a third-party ad serving company, such as Atlas or DoubleClick, you will use a tracking tag. That tracking tag will contain the actual URL you are attempting to drive users to as well as a string of seemingly random letters and numbers that are generated by the tracking application. Once users click your ad, they are directed to the destination URL while seamlessly passing information to the tracking application.

A first basic clickTag example

If the client wants a clickTag banner, then the most simple situation is this: he wants you to implement a swf. This swf will be delivered to the appropriate site and they will take care to put it online. Though, having said that the clickTag code works in concert with the variables being passed in from the HTML container (in the site that the banner will be hosted), you have to make sure that the swf will redirect the users that will click on it, from the address that it will receive from the hosting html. Here’s the code:

// Define loader info object (Flash variables from browser)
var flashVars:Object = LoaderInfo(this.root.loaderInfo).parameters;

// Event listener for clickable object
clickBtn.addEventListener(MouseEvent.CLICK,clickHandler);

// Function that is called upon click of your object
function clickHandler(e:MouseEvent):void {
    if(flashVars.clickTag){
        navigateToURL(new URLRequest(flashVars.clickTag),'_blank');
    }
}

A case-insensitive clickTag

If you make Flash banners that run across multiple media sites, the lack of a standard “clickTag” can be a huge pain. Some media sites use clickTag. The version with that is all lower-case except for a capital T seem seems to be the most common form, but there are sites that use clickTAG, clicktag, or CLICKTAG. What that means is that you can end up creating multiple versions of a banner just to deal with the difference in how the word “clickTag” uses capital and lower case letters on the various media sites your banners will be running on. With a large media buy, that can easily double or triple the number of files you need to keep organized.

There is a solution to handle multiple clickTag versions in a single banner. It’s good for Flash developers plus the people who have to keep track of them for delivery.

The code looks through all the root variables, converts each of them to lowercase and then tries to match the word “clicktag” and then assigns the click thru URL.

function clickHandler(e:MouseEvent):void {
    for (var i:String in flashVars) {
        if (i.toLowerCase() == "clicktag") {
            navigateToURL(new URLRequest(flashVars[i]),'_blank');
        }
    }          
}

Testing a clickTag flash banner

You can use the i.M.H.O. free tool to test if your clickTag banner is woking.

Embedding the banner in a HTML page

You can use the ClickTAG swf embed code generator.

 

Post A Comment

Anti-Spam Quiz: