Google click tag

DescriptionActionscript snippet by - 07/07/10

Here is everything you need to add a click tag to your flash banner add with actionscript.

For As2:
Create a transparent button overlay that covers the entire banner. Add the code for as2 to the 'Actions-Button' window for that button.

For As3:
Create a transparent button overlay that covers the entire banner add and name the instance = 'buttonOverlay', add the snippet below to frame one on its own layer called 'actions'.


That should be all you need to do to get your banner to track and to use with google adwords.

The HTML embed code is for use as an example of how the click tag works. Make sure to capitalize TAG in the clickTAG variable. The first part of the paramater that contains the query string is the location of the actual banner .swf file, after the question mark is the clickTAG variable and the location of the page you want to land on.

Tags

//The Actionscript2 Part

on (release) {

getURL(clickTAG, "_blank");
}

//The Actionscript3 Version (This does not work for google, use the Actionscript2 version above)

var paramList:Object = this.root.loaderInfo.parameters;

buttonOverlay.addEventListener(MouseEvent.CLICK, openURL);

function openURL(evtObj:MouseEvent):void {
var request:URLRequest = new URLRequest(paramList["clickTAG"]);
navigateToURL(request, "_blank");
}

//The HTML part

<object type="application/x-shockwave-flash" data="http://url_of_the_banner.com/swf/banner1.swf?clickTAG=http://the_landing_page.com" width="728" height="90">
<param name="quality" value="high" />
<param name="wmode" value="transparent" />
<param name="swfversion" value="6.0.65.0" />
<param name="expressinstall" value="scripts/expressInstall.swf" />
<param name="movie" value="http://url_of_the_banner.com/swf/banner1.swf?clickTAG=http://the_landing_page.com" />
</object>
  • Share
Authored by: Adam J Nowak
http://hyperspatial.com

2 Responses to “Google click tag”

  1. What if I have 2 clicktags in one ad, for example

    clicktag1 and clicktag2

    how do I create a html for that.

    Thanks

  2. No idea, I have not done any click tag work since this snippet was posted. Check out Google help on the subject, I think that's where I figured it out in the first place. Good Luck!

Comments and Feedback