Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

Data elements when using an Adobe client data layer

philipk92120636
Level 4
Level 4

Hi everyone!

Just checking out this documentation:

https://github.com/adobe/adobe-client-data-layer/wiki

I'm guessing this allows you to use the Adobe Client Data Layer extension in Launch.

My question, how do you reliably reference elements in the data layer if it pushes the objects and parameters as indexed items in an array?

Our data layer is an object so it's very easy to reference the path as a JS variable e.g. digitalData.product.id, but if it's in an array how would you know which index number to reference to reliably bring back the desired value?

Does the extension add in a different data element type to handle this?

1 Accepted Solution
yuhuisg
Correct answer by
Community Advisor
Community Advisor

Firstly, make sure you install the Adobe Client Data Layer extension in Launch. That will simplify some (though not all) of your setup.

Secondly, I don't think ACDL can work with your digitalData data layer. Your data layer must really conform to ACDL's specification to work properly. If you're using a regular digitalData key-value object, then you can stick with data elements that are built using the JavaScript variable data element type.

If you need to reference your array's items, your best bet is to do it with a Custom Code data element.

View solution in original post

4 Replies
yuhuisg
Correct answer by
Community Advisor
Community Advisor

Firstly, make sure you install the Adobe Client Data Layer extension in Launch. That will simplify some (though not all) of your setup.

Secondly, I don't think ACDL can work with your digitalData data layer. Your data layer must really conform to ACDL's specification to work properly. If you're using a regular digitalData key-value object, then you can stick with data elements that are built using the JavaScript variable data element type.

If you need to reference your array's items, your best bet is to do it with a Custom Code data element.

View solution in original post

philipk92120636
Level 4
Level 4

We're currently looking to rebuild our data layer so I was seeing if the ACDL could be an option. As we're at early stages, we could rename it accordingly and structure it as described in the documentation. I was just wondering how it would all work if there isn't a clear path to the data being pushed to the data layer. I would like to know what the end-to-end looks like really after having implemented the ACDL, how to get the data from it using Launch, and send it into Analytics etc.