Dynamic variables are a shorthand concept that let you copy values from one variable to another. They are valuable for long variable values, as they help shorten an image request’s URL length. See Dynamic variables for more information on this concept.
By default, dynamic variables use the prefix D=
. The dynamicVariablePrefix
variable lets you customize the string that identifies dynamic variables. It is case-sensitive.
The Web SDK does not use dynamic variable formatting. Instead, you can use Datastream mapping to populate multiple Target Fields using a single Source Field. See Dynamic variables using the Web SDK for more information.
If you send data directly to Adobe Analytics without conforming to a schema, it uses the following variable:
data.__adobe.dynamicVariablePrefix
Dynamic Variable Prefix is a field under the Global Variables accordion when configuring the Adobe Analytics extension.
This field contains D=
by default. You can change the value if you want to use a different dynamic variable prefix. You can use any value you want, as long as it matches the character encoding on your site.
The s.dynamicVariablePrefix
variable is a string that can contain any sequence of characters. If this variable is not defined, AppMeasurement uses the string D=
by default.
// An example that changes the dynamic variable prefix
s.dynamicVariablePrefix="..";
// This eVar uses the above customized dynamic variable prefix to set eVar to page URL
s.eVar1="..g";