Dynamic Variables

Dynamic variables let you copy values from one variable to another without typing the full values multiple times in the image requests on your site.

Dynamic variables are used when capturing the same data (for example, campaign tracking codes) in multiple variables concurrently. This is a common practice in cases where different reports offer unique and important metrics. For example, capturing internal search keywords in a Custom Conversion variable and in a Custom Traffic variable lets you view the Revenue and the Weekly Unique Visitors metrics associated with these keywords, respectively.

Dynamic variables are also useful for viewing data under various reporting conditions. A campaign tracking code can be captured in multiple eVars with various allocation and cookie expiration settings. This lets users choose the way they want to attribute conversion metrics to these campaigns.

Note: Dynamic variables are not supported in conjunction with cookies (s_cc, s_sq, s_fid, s_vi and any cookie that is set by a plugin). You can not use D=<cookie value>.

A significant benefit of dynamic variables is the ability to capture long strings of data in multiple variables without actually passing the long string repeatedly. Some browsers limit the maximum length of HTTP GET requests (including the Adobe image request). Using dynamic variables ensures that all data is captured by reducing the length of the request to Adobe servers in cases where data is duplicated across several variables.

In the Adobe image request that occurs on the page view, if you are using dynamic variables to copy the value of Custom Traffic 1 to Custom Conversion 1, you would see v1=D=c1. If eVar1 received a value previously in the request, Adobe's servers dynamically copy the value of Custom Traffic 1 to Custom Conversion 1 during data processing. As a result, the value originally passed using Custom Traffic 1 also appears in the Custom Conversion 1 reports.

Dynamic variables are passed by setting a variable to the desired value and then setting other variables to D=[variable abbreviation]. For abbreviations for each variable, see Data Collection Query Parameters. Dynamic variables can pull data from the following locations:

To create a dynamic variable, add a special prefix to the start of the value. The default prefix is "D=". There are two methods of flagging dynamic variables:

The variable abbreviation used must match the variable parameter name passed in the image request. Some variables have multiple accepted parameters used in different cases. For example, pageName= and gn= both pass the page name, but the latter is most often used in mobile and hard-coded implementations. If the image request uses pageName= to pass the page name, then D=pageName is acceptable but D=gn is not. If the image request uses gn=, then D=gn is acceptable, but D=pageName is not.

The following information applies to dynamic variables: