Is it possible do pull info from the GA enhanced ecommerce datalayer already in place or do I need to have my developers to also set a datalayer specifically for Adobe?
Solved! Go to Solution.
Views
Replies
Total Likes
Yes. This should be doable using the Data Layer Manager, Adobe Analytics, and AA Product String Builder Extensions.
The first step will be to install and configure the Data Layer Manager extension.
Assuming that your GTM data layer is the default name, window.dataLayer, I'd suggest the following config:
Once this is done and built to your dev library, there will be a custom event dispatched whenever a JSON object that includes an "event" key set. As an example, let's say that this GTM EEC payload is pushed:
When it is pushed, the Data Layer Manager will dispatch a custom event with the type, "GA_EEC:AddToCart". You can easily trigger a Launch rule using the CORE > CustomEvent trigger as below:
Note a couple things:
Step 2:
Install the Adobe Analytics and AA Product String Builder extensions. We will be adding actions from both of these extensions. In the end, it will look like this:
On the same rule triggered by the event described in Step 1, add the Clear Variables action and a Set Variables action from the Adobe Analytics Extension. Set the "prodView" event and any other values that you'd like to send on the same beacon.
Then Add a Set Variables action from the AA Product String Builder extension as below:
The only trickery here is the value entered in "Root Data Object".
That value is %event.detail.__meta.computedState% . It points to into the context of the event that triggered the rule. Within that context is the __meta.computedState object which is provided by the Data Layer Manager whenever an event is pushed to the data layer.
The other values are just paths to attributes within the "products" array. In this case, we are mapping:
Once this is done, add a "Send Beacon" action to the end of this action sequence. Then save the rule, build your library and test!
Just in case you need it, there is another tutorial on this subject here. It is not specific to the GTM EEC data layer structure, but it demonstrates the same concepts.
Cheers,
-Stew
Yes. This should be doable using the Data Layer Manager, Adobe Analytics, and AA Product String Builder Extensions.
The first step will be to install and configure the Data Layer Manager extension.
Assuming that your GTM data layer is the default name, window.dataLayer, I'd suggest the following config:
Once this is done and built to your dev library, there will be a custom event dispatched whenever a JSON object that includes an "event" key set. As an example, let's say that this GTM EEC payload is pushed:
When it is pushed, the Data Layer Manager will dispatch a custom event with the type, "GA_EEC:AddToCart". You can easily trigger a Launch rule using the CORE > CustomEvent trigger as below:
Note a couple things:
Step 2:
Install the Adobe Analytics and AA Product String Builder extensions. We will be adding actions from both of these extensions. In the end, it will look like this:
On the same rule triggered by the event described in Step 1, add the Clear Variables action and a Set Variables action from the Adobe Analytics Extension. Set the "prodView" event and any other values that you'd like to send on the same beacon.
Then Add a Set Variables action from the AA Product String Builder extension as below:
The only trickery here is the value entered in "Root Data Object".
That value is %event.detail.__meta.computedState% . It points to into the context of the event that triggered the rule. Within that context is the __meta.computedState object which is provided by the Data Layer Manager whenever an event is pushed to the data layer.
The other values are just paths to attributes within the "products" array. In this case, we are mapping:
Once this is done, add a "Send Beacon" action to the end of this action sequence. Then save the rule, build your library and test!
Just in case you need it, there is another tutorial on this subject here. It is not specific to the GTM EEC data layer structure, but it demonstrates the same concepts.
Cheers,
-Stew
Views
Like
Replies
Views
Likes
Replies