Adobe Data Layer - Array Length | Community
Skip to main content
Level 3
September 9, 2025
Solved

Adobe Data Layer - Array Length

  • September 9, 2025
  • 1 reply
  • 615 views

Hey,

 

We are currently leveraging the Adobe Data Layer for tracking page changes via event pushes on SPA pages.

 

Can anyone provide any guidance / experience regarding the impact of not setting a limit on the number of data later push / objects that are present in the Adobe Data Layer. 

 

For a given session:

  • A user may spend an extended amount of time on a page/ site thus extended the Adobe dataLayer
  • Potential impact to mobile users? Bandwidth / Network impact if any?

 

Is there any potential impact from an Adobe Web SDK capturing perspective?

 

Thanks,

Ty

Best answer by tyrese

It's the actual limit of javascript arrays 😅

 

as I said, I don't see an issue. Tracking of state changes with WebSDK is standard.


Hey @bjoern__koth 

 

thanks for the adding information and confirmation on the impact.

 

I developed this ahead of time - it may still be useful to any other individuals looking to trim the number of dataLayer objects whilst maintaining the [0] object and the most recent object.

 

if (adobeDataLayer.length > 20) {

    const first = adobeDataLayer[0];

    const last = adobeDataLayer[adobeDataLayer.length-1];

    adobeDataLayer.length = 0;

    adobeDataLayer.push(first,last);

}

 

Thanks,

Ty

1 reply

bjoern__koth
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
September 16, 2025

Hi @tyrese 

I would not care about the number of items in the data layer. That's an array that will likely never reach its maximum length. I would rather be concerned of potentially sending a LOT of billable server calls. Since these calls will likely not happen at the same time, the overall used bandwidth should be negligible.

 

I would recommend checking what tracking calls and data layer pushes actually make sense from a reporting perspective.
There appears to be a lot of background noise on your pages.

Cheers from Switzerland!
tyreseAuthor
Level 3
September 16, 2025

Hey @bjoern__koth 

 

We are currently leveraging the dataLayer pushes as a method of tracking page changes on SPA pages - are you saying that these dataLayer pushes have an impact on billable server calls? If so can you provide any Adobe Documentation explaining this?

 

Thanks,

Ty

bjoern__koth
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
September 17, 2025

Hi @tyrese 

only if you are mapping the data layer pushes to any kind of analytics tracking call.

 

In general, any push to the data layer without triggering a tag (marketing or analytics side) won't do anything to the performance of the website.

In theory, you can - had to look it up - push 4,294,967,295 (2^32 - 1) items to your dataLayer which is rather unlikely to reach 😉

 

Bottom line: the data layer is extremely lightweight, so there is no harm in using it for your SPA changes.

Cheers from Switzerland!