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

DCM

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.

Legacy DFP

You can add custom ad tag parameters in legacy DFP in Creative Properties, under Ad Serving Data > Keys and Keys Value.

Use custom ad tag parameters  in Flash

To get custom ad tag parameter key values to work in DCM 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.

Example

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");
                expanding.startExpanded("AutoExpand");
          }
};
enabler.addEventListener(StudioEvent.PAGE_LOADED, pageLoadedHandler);