adobe-client-data-layer
adobe-client-data-layer copied to clipboard
Launch extension: allow `eventInfo` to be retrieved with data elements
Expected Behaviour
Given an ACDL push like so:
window.adobeDataLayer.push({
"event": myEvent",
"eventInfo": { foo: "bar" }
});
Then there should be an ACDL data element type that when provided with the key eventInfo.foo
, the data element returns "bar"
.
The Data Layer Computed State data element type is not able to read eventInfo
, because eventInfo
does not persist in the data layer.
Actual Behaviour
There is no such data element to retrieve eventInfo
fields.
Steps to Reproduce
See "Expected Behaviour".
Platform and Version
All platforms, all versions.
Sample Code that illustrates the problem
See "Expected Behaviour".
I mentioned this to Benedikt Wedenik as well, so thumbs up for it. Though this is only the ACDL itself and not the Launch extension built around it. Not sure if there is now a separate github space for it.
In case it helps, I believe you can create a Custom Code data element with the following:
return event.eventInfo.foo;