Posts Tagged ads
clickTAGs and FlashVars: everything you ever wanted to know
Posted by ani in programming, tech, web on April 16th, 2009
For folks in the online ad space, clickTAGs are a familiar sight. However, you’d be surprised how many people are unaware of how it actually works. I’ll try and summarize that here.
- Flash-based ads are .swf files that need to be loaded onto an HTML page.
- The most common way to add external objects like .swf files into an HTML page is by using the object-embed tag combination.
- Usually, data parameters need to be passed to the .swf file (like variable information or redirect URLs for click tracking).
- This is accomplished through the concept of FlashVars (aka. “flash variables”).
- One of these FlashVars is a parameter called clickTAG, a standard variable name used by most ad creatives to identify a click tracking redirect URL.
- Why use a redirect URL for click tracking? If the ad clicked-through to the destination URL (say, www.acura.com), the ad servers that loaded that Flash ad would never know if the user actually clicked on the ad. To get around this, most ad servers have all clicks route through them first, before 302‘ing to the destination page.
One of the limitations of clickTAG, I’ve realized, is that it can mangle a long query string. Since Flash delimits multiple flash variables through an ampersand (the & character), it can get in the way of passing a long query string as the redirect URL. That is to say, if you were trying to do something like:
<embed src="my_movie.swf" flashvars="clickTAG=http://www.mywebsite.com/redirect?data1=100&data2=200&data3=300">
Flash would interpret the flashvars as 3 variable-data pairs:
clickTAGas"http://www.mywebsite.com/redirect?data1=100"data2as200data3as300
Instead of clickTAG being set as the URL with the query string.