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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Coffee Break: Join us on Wednesday, April 5th at 10am PT to chat with Ben Gaines, Director of Product Management for Adobe Analytics. Ben will be online to answer your Analytics and Adobe Summit questions.
SOLVED

Structure of data layer: Advantages and disadvantages

Avatar

Level 5

Hi everyone!

Our current data layer is a single object. I've seen the approach of a data layer comprised of a top level object with other objects nested inside.

For comparison, our current page name property is accessed using dataLayer.pageName but in the nested approach it would be something like dataLayer.page.pageName.

I was wondering what the advantages are of this nested approach for marketeers, developers, and from a configuration perspective? Conversely what are the challenges? Our current data layer works quite well so I don't want to pursue a big change if the costs outweigh the benefits.

1 Accepted Solution

Avatar

Correct answer by
Level 5

If your current data layer works for you - then keep using it.  Many people use the array approach because it aligned with the WC3 recommendations.  

1 Reply

Avatar

Correct answer by
Level 5

If your current data layer works for you - then keep using it.  Many people use the array approach because it aligned with the WC3 recommendations.