Data elements with values that are dynamic will return the same value when the user's desired action has executed.
Actual Behaviour
Data elements with values that are dynamic are evaluated when components that use them are executed, which may not correspond with the user's desired action.
Reproduce Scenario (including but not limited to)
Steps to Reproduce
For both of the following examples:
Create a data element of Core > Random Number type. Leave the data element configuration with its default values. Do not set any default value. Leave its Storage Duration to "None". Save it as the data element "random number"
Create a rule with a Core > DOM Ready event. No other events are required. No conditions are required. Actions will be added in the below examples.
Using the Adobe Analytics extension as an example:
In the extension configuration, set a global variable, e.g. "Page Name", and set its value to %random number%.
In the "DOM Ready" rule, add a "Set Variables" action. Add a variable, e.g. "eVar1", and set its value to %random number%.
In the same "DOM Ready" rule, add a "Send Beacon" action to send a s.t() (pageview) beacon.
Using the Facebook Pixel extension as an example:
In the extension configuration, set the "Pixel ID" field to %random number%.
In the "DOM Ready" rule, add a "Send Lead Event" action, and set its "Value" field to %random number%.
Platform and Version
All
Sample Code that illustrates the problem
See this attached Launch container: container.js.txt.
This container contains both of the above examples together.
A Launch user could expect that, when an Adobe Analytics beacon is sent, the variables that are sent will be evaluated at the moment when that beacon is sent. So when his variables can have different values at different moments (i.e. "dynamic"), he would expect that the "final" value is the one that is sent in the beacon.
This is the problem: If that dynamic data element had been used to set a global variable in Adobe Analytics' extension configuration, then Adobe Launch evaluates that data element's value at the moment when the configuration module's code is executed. (FWIW this is documented at the developer documentation at https://experienceleague.adobe.com/docs/launch/using/extension-dev/web/views.html?lang=en#replacing-data-element-tokens.) Then, when the "Send beacon" action is run, the global variable will be tracked with that old value, instead of whatever value the data element could have evaluated to at that action's runtime moment.
This might not be obvious to the Launch user who is unaware of the inner technical workings. As a result, what he expects -- dynamic data elements are evaluated when the beacon is sent -- is different from reality -- dynamic data elements are evaluated when the corresponding module is run.
Introduce a component-level setting, "Evaluate data element at runtime", that can have a true or false value.
If true (default value): the current behaviour is used, i.e. data elements are evaluated when that component's module runs.
If false: data elements are not evaluated when that component's module runs. Instead, Launch leaves it as the data element reference. I.e. instead of evaluating %data element% to the current value, it leaves its value as %data element%.
One complication of this is that extensions do not have component-level settings. So this will need to be a new feature, if this solution is accepted.
The text was updated successfully, but these errors were encountered:
github-jira-sync-bot
changed the title
Web properties: Data Elements' runtime evaluation cannot handle dynamic data element values
Discuss: Data Elements' runtime evaluation cannot handle dynamic data element values
Jun 9, 2021
yuhui commentedMay 25, 2021
•
edited
Expected Behaviour
Data elements with values that are dynamic will return the same value when the user's desired action has executed.
Actual Behaviour
Data elements with values that are dynamic are evaluated when components that use them are executed, which may not correspond with the user's desired action.
Reproduce Scenario (including but not limited to)
Steps to Reproduce
For both of the following examples:
Using the Adobe Analytics extension as an example:
%random number%.%random number%.s.t()(pageview) beacon.Using the Facebook Pixel extension as an example:
%random number%.%random number%.Platform and Version
All
Sample Code that illustrates the problem
See this attached Launch container: container.js.txt.
This container contains both of the above examples together.
Live demo at https://jsfiddle.net/yd0a9zLx/2/
Logs taken while reproducing problem
NA
Issue Elaboration
(Using Adobe Analytics as an example.)
A Launch user could expect that, when an Adobe Analytics beacon is sent, the variables that are sent will be evaluated at the moment when that beacon is sent. So when his variables can have different values at different moments (i.e. "dynamic"), he would expect that the "final" value is the one that is sent in the beacon.
This is the problem: If that dynamic data element had been used to set a global variable in Adobe Analytics' extension configuration, then Adobe Launch evaluates that data element's value at the moment when the configuration module's code is executed. (FWIW this is documented at the developer documentation at https://experienceleague.adobe.com/docs/launch/using/extension-dev/web/views.html?lang=en#replacing-data-element-tokens.) Then, when the "Send beacon" action is run, the global variable will be tracked with that old value, instead of whatever value the data element could have evaluated to at that action's runtime moment.
This might not be obvious to the Launch user who is unaware of the inner technical workings. As a result, what he expects -- dynamic data elements are evaluated when the beacon is sent -- is different from reality -- dynamic data elements are evaluated when the corresponding module is run.
Related story from Jennifer Kunz.
Possible Solution
Introduce a component-level setting, "Evaluate data element at runtime", that can have a
trueorfalsevalue.If
true(default value): the current behaviour is used, i.e. data elements are evaluated when that component's module runs.If
false: data elements are not evaluated when that component's module runs. Instead, Launch leaves it as the data element reference. I.e. instead of evaluating%data element%tothe current value, it leaves its value as%data element%.One complication of this is that extensions do not have component-level settings. So this will need to be a new feature, if this solution is accepted.
The text was updated successfully, but these errors were encountered: