Macromedia Flash Trafficking Guide

Introduction

Macromedia currently recommends a method to track clicks on Flash ads with the use of variables. Previously, the click tracking string had to be embedded into the Flash movie (swf file). The click tracking string would be embedded either manually or via Macromedia Generator. This method is no longer recommended.

The recommended “clickTag” method shown at, http://www.macromedia.com/resources/richmedia/tracking/designers_guide/, uses variables to pass the click tracking string into Flash movies. As a result, instead of making separate files with separate click tracking strings, only one set of files is needed. If the files adhere to the method shown on the site, the same set of files can be used for multiple campaigns, different sites, and different ad serving networks.

Please note that some sites have specific Flash requirements. In these instances, the site's requirements should be followed instead of the DART requirements. For example, for AOL, follow their Flash requirements instead of the requirements below. If you have questions as to whether to follow a site's requirements or DARTs requirements, please contact your Technical Account Manager.

This document describes the method in general and also provides information specific to implementing this method with DoubleClick DART ad serving technology.

SWF Movie Requirements (for the Flash developer)

Please note that for certain sites, e.g. AOL, the site's specifications should be followed instead of the below information.

For the most part, the movie is made just like any other Flash movie. Any swf file specifications provided by the site still apply. Any animation or ActionScript that you would normally use can be used with this method. The main difference is in the settings for click through (getURL) actions.

DART swf file requirements (summary):

Flash version / 4 or higher
filenames / All lower case characters without ampersands, asterisks, slashes, spaces, or question marks.
maximum file size / 39,000 bytes (However sites might restrict the file to a smaller size. DART may also restrict the filesize. Check with your Technical Account Manager.)
getURL actions / In general:
* The URL should be _level0:clickTag or _level0.clickTag (depending upon Flash version)
* The URL is set for an expression.
* The target window is set to "_blank".
* Variables is set to "Don't send".

There are some special situations that have different requirements. Some examples of these situations are:

·  Clicking on the Flash creative launches a pop-up window

·  Using FSCommands to communicate between the browser and the Flash creative

·  Sending variables from the Flash creative to the click through URL

Please reference the list of related articles for these special situations.

The figures, in the details below, show examples of what the Flash interface should look like when all the parameters are set appropriately.

DART swf file requirements (details):

Flash version

Flash 3 creatives do not support variables. As a result, the swf file must be made for Flash versions 4 or higher. Be sure to publish the swf file as a Flash 4 or higher creative.

Filenames

Because the creatives are served over the Internet, certain characters should not be in the filename. These characters cause problems when the creative is served over the Internet. These characters include:

ampersands
asterisks / *
slashes / \ or /
spaces
question marks / ?

Additionally, to be safe, all the characters in the filename should be in lower case.

Maximum file size

DART for Publishers has a file limit of 39,000 bytes. Each file should be less than 39,000 bytes. A large movie can be split into multiple 39,000 byte files. However, the ActionScript code in the movies needs to pass on click tracking variables. Please contact DART Support for more information. Additionally, DART may impose file size upload restrictions. If you need to confirm your filesize upload limit or need to modify it, check with your Technical Account Manager.

GetURL actions

clickTag should be the variable used for the URL in a getURL action. As recommended in Macromedia's Rich media Tracking Kit, clickTag can be used for both the click tracking string and the URL together. The HTML and sniffer code will have both clickTag and the URL. As a result, the only text in the URL box is "_level0:clickTag" (without the quotes) or "_level0.clickTag" (if in Flash 5/6, without the quotes). The _level0 part is included for 'pathing' purposes- to ensure that Flash can properly locate the variable. To learn more about variables and their paths refer to:

http://www.macromedia.com/support/flash/ts/documents/varpath.htm (Flash 5)

Because clickTag is a variable, the text that is entered into the URL box is an expression. When the movie plays, the expression will be evaluated and replaced with the click tracking string and the destination URL. In order for this method to function correctly, you must indicate that the text is an expression. In Flash 5 and Flash 6 (MX), the expression check box should be checked. (See Fig. 1 and 2.) Note that there are two buttons or check boxes. One is for the URL and one is for the target window. Make sure that the button or check box for the URL is set correctly.

Most rich media advertising is served through a separate frame, an iframe, or via JavaScript. Frames or JavaScript allow a site to rotate ads. Because frames are sometimes used, the target window for the click through URL must be set to either "_top" or "_blank". If the target window is set incorrectly, the advertiser's site might appear in the wrong window. Use "_blank" to open a new browser window and use "_top" for the site to open in the same window. Never leave the target statement undeclared.

When the click through occurs, the browser will first contact the ad server to count the click and then go to the advertiser's site. If you are not passing variables to the advertiser's site, set the Variables drop down box to "Don't send". To pass variables with DoubleClick ad servers, choose "Send using GET". If the advertiser's servers cannot use the GET method for variables, please contact DART support for assistance.

For Flash 5, the URL should look something like Fig. 1.

Figure 1 - getURL in Flash 5

For Flash 6, the URL should look something like Fig. 2.

Figure 2 - getURL in Flash 6

Implementing the ad in DART (for the DART trafficker)

Please note that some sites have specific requirements and a different process. For example, AOL might have a different process. Please refer to the list of related articles.

For a Flash ad, it is important to use some sort of sniffer code to detect the Flash plugin. With the sniffer code, the Flash ad will display when the Flash plugin is installed. If the Flash plugin is not installed, a gif image (aka a 'degrade') will appear. If a sniffer code is not used, the browser could ask the viewer to download the Flash plugin or show a broken image.

The sniffer code should come from the Flash developer in the form of an HTML file. It is easiest to use Flash to automatically create the correct sniffer. If the publish settings are set correctly, Flash will create a sniffer code when publishing the swf file. Macromedia provides standard templates for the HTML file. The HTML templates that will create an appropriate sniffer code are:

Ad4Banner.html

Ad5Banner.html

Ad6Banner.html

Alternatively, it is possible to use the DART for Publishers sniffer code generator available at http://help.doubleclick.net.

A correct sniffer code would look something like the file in Appendix A. An incorrect "sniffer code" would look something like Appendix B. Sometimes a custom sniffer script is used. Parts of a custom sniffer code will look like Appendix A, but the overall code may be drastically different. Compared to incorrect sniffer code, correct sniffer code always has some JavaScript code and vbscript code. Also, the correct sniffer code has several lines beginning with "document.write". If you compare Appendix A with Appendix B, you will see these differences.

Trafficking the ad is very similar to trafficking an HTML ad. This section assumes that you are familiar with the DART interface and trafficking rich media or HTML ads. The main difference between trafficking this Flash ad and an HTML banner involves modifying the sniffer code and uploading the Flash files. This section also assumes that you will be creating your own HTML and sniffer. If you are using a DART rich media template, many of these steps are completed for you.

Changing the SWF filename

For the sniffer code, find every place that has the swf file name. For instance in Appendix A, the file "movie.swf" appears twice in the code (look for the bold underlined filename). The movie filename should appear at least once in the code and could appear twice. You will want to add some text to this filename. In front of the filename, you will want to add "%h" followed by the advertiser id number. At the end of the movie filename, you will want to add "?clickTag=%c". So for the example in Appendix A, assuming that the advertiser id is 372444, everywhere that "movie.swf" appears, it would be replaced with:

%h/372444/movie.swf?clickTag=%chttp%3a%2f%2fwww.clickhthruUrl.com

Changing the image filename

For the image files, you will want to put "%h" and the advertiser id in front of the filename. For instance, Appendix A has an image called "movie.gif" (these filenames are underlined in Appendix A.). Note that these gif filenames can appear multiple times as well. In front of the filename, you will want to add "%h" followed by the advertiser id. Assuming that the advertiser id is 372444, the filename "movie.gif" would be changed to:

%h/372444/movie.gif

Changing the click through URL for the images

The a href tags also need to be modified in order to track clicks. These tags should appear near the image tags. For instance, in Appendix A, the click through URL is "http://www.siteURL.net" (these URLs are in underlined italic characters). The "http://" should be changed to "%chttp%3a%2f%2f"; so after modification, the click through URL would look like:

%chttp%3a%2f%2f www.siteURL.net

Uploading the code, swf. and gif files

Go into the ad placement and paste the modified code into the rich media creative area of the ad placement. After you have pasted in the sniffer code, upload the swf file and the gif file. After uploading the files, you can finish setting up the ad placement. When you are done, you should be able to preview the ad and click through correctly.

Appendix A - sample sniffer code

<SCRIPT LANGUAGE=JavaScript>

<!--

var plugin = 0;

if (navigator.mimeTypes & navigator.mimeTypes["application/x-shockwave-flash"] & navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin) {

if (navigator.plugins & navigator.plugins["Shockwave Flash"])

plugin = 1; }

else if (navigator.userAgent & navigator.userAgent.indexOf("MSIE")>=0 & (navigator.userAgent.indexOf("Windows 95")>=0 || navigator.userAgent.indexOf("Windows 98")>=0 || navigator.userAgent.indexOf("Windows NT")>=0)) {

document.write('<SCR'+'IPT LANGUAGE=VBScript> ');

document.write('on error resume next ');

document.write('plugin = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.3")))');

document.write('if ( plugin <= 0 ) then plugin = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.4")))');

document.write('if ( plugin <= 0 ) then plugin = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.5")))');

document.write('</SCR'+'IPT>'); }

if ( plugin ) {

document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');

document.write(' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=3,0,0,0" ');

document.write(' ID=movie1 WIDTH=550 HEIGHT=400>');

document.write(' <PARAM NAME=movie VALUE="movie1.swf"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#FFFFFF> ');

document.write(' <EMBED src="movie1.swf" quality=high bgcolor=#FFFFFF ');

document.write(' swLiveConnect=FALSE WIDTH=550 HEIGHT=400');

document.write(' TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">');

document.write(' </EMBED</OBJECT>');

} else if (!(navigator.appName & navigator.appName.indexOf("Netscape")>=0 & navigator.appVersion.indexOf("2.")>=0)){

document.write('<A TARGET="_top" HREF="http://www.siteURL.net"<IMG SRC="movie1.gif" WIDTH=550 HEIGHT=400 BORDER=0>'); }

//-->

</SCRIPT>

<NOSCRIPT>

<A TARGET="_top" HREF="http://www.siteURL.net"<IMG SRC="movie1.gif" WIDTH=550 HEIGHT=400 BORDER=0>

</NOSCRIPT>

Appendix B - Incorrect Sniffer Code (plug-in with no sniffer)

<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" WIDTH=550 HEIGHT=400>

<PARAM NAME=movie VALUE="movie1.swf">

<PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE="#FFFFFF">

<EMBED src="movie1.swf" quality=high bgcolor="#FFFFFF" WIDTH=550 HEIGHT=400 TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">

</EMBED>

</OBJECT>