Custom ad tag parameters

Custom ad tag parameters let you change simple functionality without revising your creatives. By setting these parameters, media agencies (using DCM) or publishers (using DFP) enter keywords and key values in DCM or DFP, which are then passed to the Rich Media asset. The keywords and key values control certain aspects of a Rich Media creative. For example, they might allow a creative to auto-expand.

Here are some commonly used custom ad tag parameters in DoubleClick Rich Media templates.

Function Key value to use Accepted values Default value
Auto expand startExpanded= true,false false
Show float on load autoFloat= true,false false
Sound on on load soundOn= true,false false
Sound on on mouseover mouseoverSoundOn= true,false false
Sound off on mouseout mouseoutSoundOut= true,false false
Use cookie useCookie= true,false false

Templates in the template database that use this feature are highlighted with the feature "Custom Variable Controls."

Set up custom key values in DCM or DFP


In your Rich Media creative properties, open the Creative parameters section and enter the required key-value pair (such as startExpanded=true) in the Key-value parameters section.

Note that there is a 180-character limit on the parameters you can enter into this DCM field.

DoubleClick for Publishers

You can add custom ad tag parameters in DFP in Creative Properties, under Creative Settings > Ad tag key.

Use custom ad tag parameters  in Flash

To get custom ad tag parameter key values to work in DCM or DFP, you must add the following code to the Flash files. Each code snippet stores the requested key value in a variable, which creative agencies can access in their Flash file to generate the required functionality.

Auto expand
var autoExpand:Boolean = false;
trace("Checking <autoExpand> parameter from DCM\DFP");
if (enabler.getParameter("autoExpand")) {
        autoExpand = enabler.getParameter("autoExpand");
Use cookie

Make sure the publisher accepts cookie usage on their site before using this approach.

var useCookie:Boolean = false;
trace("Checking <useCookie> parameter from DCM\DFP");
if (enabler.getParameter("useCookie")) {
        autoExpand = enabler.getParameter("useCookie");  
Show float on load
var autoFloat:Boolean = false;
trace("Checking <autoFloat> parameter from DCM\DFP");
if (enabler.getParameter("autoFloat")) {
        autoFloat = enabler.getParameter("autoFloat");  
Sound on load
var soundOn:Boolean = false;
trace("Checking <soundOn> parameter from DCM\DFP");
if (enabler.getParameter("soundOn")) {
        soundOn = enabler.getParameter("soundOn");
Sound on on mouseover
var mouseoverSoundOn:Boolean = false;
trace("Checking <mouseoverSoundOn> parameter from DCM\DFP");
if (enabler.getParameter("mouseoverSoundOn")) {
        mouseoverSoundOn = enabler.getParameter("mouseoverSoundOn");
Sound on on mouseout
var mouseoutSoundOn:Boolean = false;
trace("Checking <mouseoutSoundOn> parameter from DCM\DFP");
if (enabler.getParameter("mouseoutSoundOn")) {
        mouseoutSoundOn = enabler.getParameter("mouseoutSoundOn");

After you use the code above to find the value of a custom ad tag parameter, you need more code to define what happens if the parameter equals a certain value (usually true or false). Each template in the template database uses code based on the example, below.


In this example, the page loads first, before the key parameter startExpand returns true or false. If true, the creative auto-expands using the Expanding component.

var pageLoadedHandler:Function = function(event:StudioEvent):void {
        if(startExpanded) {
                enabler.counter("Auto Expanded");
enabler.addEventListener(StudioEvent.PAGE_LOADED, pageLoadedHandler);
Android-style image of the author of this page

Sarah is a DoubleClick Studio expert and author of this help page. Help her improve this article by leaving feedback below.

Was this article helpful?