Custom ad tag parameters

Custom ad tag parameters let you change simple functionality without revising your creatives. By setting these parameters, media agencies (using DFA/DCM) or publishers (using DFP) enter keywords and key values in DFA/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 DFA, DCM, or DFP

DFA Trafficking

You can add custom ad tag parameters in DFA Trafficking in Creative Properties, under the Assets tab.

  1. Open Creative Properties.
  2. In the Properties tab, scroll down to Custom Ad Tag Parameters and enter the required key-value pair, for example, startExpanded=true.

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.

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 DFA 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 DFA\DFP");
if (enabler.getParameter("autoExpand")) {
        autoExpand = enabler.getParameter("autoExpand");
}

Use cookie

var useCookie:Boolean = false;
trace("Checking <useCookie> parameter from DFA\DFP");
if (enabler.getParameter("useCookie")) {
        autoExpand = enabler.getParameter("useCookie");  
}

Show float on load

var autoFloat:Boolean = false;
trace("Checking <autoFloat> parameter from DFA\DFP");
if (enabler.getParameter("autoFloat")) {
        autoFloat = enabler.getParameter("autoFloat");  
}

Sound on load

var soundOn:Boolean = false;
trace("Checking <soundOn> parameter from DFA\DFP");
if (enabler.getParameter("soundOn")) {
        soundOn = enabler.getParameter("soundOn");
}

Sound on on mouseover

var mouseoverSoundOn:Boolean = false;
trace("Checking <mouseoverSoundOn> parameter from DFA\DFP");
if (enabler.getParameter("mouseoverSoundOn")) {
        mouseoverSoundOn = enabler.getParameter("mouseoverSoundOn");
}

Sound on on mouseout

var mouseoutSoundOn:Boolean = false;
trace("Checking <mouseoutSoundOn> parameter from DFA\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);