Data elements when using an Adobe client data layer

Avatar

Avatar
Validate 10
Level 3
philipk92120636
Level 3

Likes

14 likes

Total Posts

91 posts

Correct reply

8 solutions
Top badges earned
Validate 10
Validate 1
Contributor
Give Back 3
Give Back
View profile

Avatar
Validate 10
Level 3
philipk92120636
Level 3

Likes

14 likes

Total Posts

91 posts

Correct reply

8 solutions
Top badges earned
Validate 10
Validate 1
Contributor
Give Back 3
Give Back
View profile
philipk92120636
Level 3

24-06-2021

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?

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Publish 1
MVP
yuhuisg
MVP

Likes

200 likes

Total Posts

606 posts

Correct reply

121 solutions
Top badges earned
Publish 1
Affirm 100
Springboard
Bedrock
Validate 1
View profile

Avatar
Publish 1
MVP
yuhuisg
MVP

Likes

200 likes

Total Posts

606 posts

Correct reply

121 solutions
Top badges earned
Publish 1
Affirm 100
Springboard
Bedrock
Validate 1
View profile
yuhuisg
MVP

25-06-2021

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.

Answers (0)