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:
Is there any potential impact from an Adobe Web SDK capturing perspective?
Thanks,
Ty
Views
Replies
Total Likes
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.
Views
Replies
Total Likes
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
Views
Replies
Total Likes
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.
Views
Replies
Total Likes
Hey @bjoern__koth in this scenario we are leveraging the event dataLayer push to trigger the Adobe Web SDK. Does that change anything?
Also where did you find that item limit count? Can you provide the link?
Thanks,
Ty
Views
Replies
Total Likes
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.
Views
Replies
Total Likes
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
I mean technically you can do whatever you want with the adobeDataLayer, but I think you won't need to.
I have seen AEM pages that push all sorts of component show events, ending up with 100+ items in the data layer and never experienced problems with that.
Obviously, you can argue whether all of these pushes were necessary (imho they weren't), but this is what the AEM core components do out of the box.
But glad to hear that you came up with a solution that works for you.
Views
Likes
Replies
Views
Likes
Replies