Structure of data layer: Advantages and disadvantages | Adobe Higher Education
Skip to main content
Level 4
January 8, 2020
Resuelto

Structure of data layer: Advantages and disadvantages

  • January 8, 2020
  • 1 respuesta
  • 3019 visualizaciones

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.

Este tema ha sido cerrado para respuestas.
Mejor respuesta de fsakjlfdsakljfd

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 respuesta

fsakjlfdsakljfd
Level 5
January 8, 2020

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.