A clickTAG is a parameter used in Flash banner ad creatives. The parameter is a variable that defines the URL of the landing page from the markup code. A clickTAG makes it possible for an advertiser to see and modify the URL without a Flash developer.
Before we explain how to add a clickTAG, some important notesThe ONLY correct way to write clickTAG is clickTAG;
- in ActionScript 2 you refer to the clickTAG variable as _root.clickTAG;
- in ActionScript 3 you refer to the clickTAG variable as root.loaderInfo.parameters.clickTAG;
- Never give a variable or movie clip a name like clicktag, clickTag, … ;
- There is no need to check if the clickTAG contains 'http:' or 'https:';
- We suggest to not use the ExternalInterface functionality as ad blockers may block them.
To add a clickTAG to your ad correctly, follow the following steps:
- Make your ad.
- Add a new layer on top of all the other layers and name the new layer "clickTAG". To add a new layer, do one of the following:
- Click the New Layer button at the bottom of the Timeline.
- Select Insert > Timeline > Layer.
- Right-click a layer's name in the Timeline and select Insert Layer from the menu.
- Add a button, choose Insert > New Symbol.
- In the Create New Symbol dialog box,
- Enter a name for the button in the Name field
- And select Button in the Type drop-down.
- Insert a new keyframe. Do one of the following:
- Select Insert > Timeline > Keyframe.
- Right-click the Hit frame and select Insert Keyframe from the menu.
- Draw a rectangle the size of your ad (or alt+click with the rectangle tool selected). Do not worry about the fill colour and border as the rectangle won't be visible.
- Go back to Scene 1.
- Select the "clickTAG" layer.
- Drag the newly created button on the stage and align it again. Again, do not worry about the colour as it won't be visible when published.
- Access the Property inspector (Windows > Properties) and give the button an instance name, for example "clickTAGbutton".
- Make sure it covers all the animation frames if you use a frame based animation.
- Add a script layer.
- Add one of the following code snippets to the script layer:
Replace 'button' with the instance name you have given the button.
- Debug and test your creative.
You are done. Your ad contains a clickTAG now.