dynamicVariablePrefix
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.
Dynamic variable prefix using the Web SDK
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 ÃÛ¶¹ÊÓƵ Analytics without conforming to a schema, it uses the following variable:
- Data object:
data.__adobe.dynamicVariablePrefix
Dynamic Variable Prefix using the ÃÛ¶¹ÊÓƵ Analytics extension
Dynamic Variable Prefix is a field under the Global Variables accordion when configuring the ÃÛ¶¹ÊÓƵ Analytics extension.
- Log in to using your ÃÛ¶¹ÊÓƵID credentials.
- Click the desired tag property.
- Go to the Extensions tab, then click the Configure button under ÃÛ¶¹ÊÓƵ Analytics.
- Expand the Global Variables accordion, which reveals the Dynamic Variable Prefix field.
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.
s.dynamicVariablePrefix in AppMeasurement and the Analytics extension custom code editor
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";