Expand my Community achievements bar.

Adobe Data Layer Implementation


Level 1

Hi Everybody, 


I have a client that implemented the dataLayer like this (See the pictures):

1) He made a dataLayer push that is going to sent the information

2) He  put this code "window.adobeDataLayer = Object.assign({}, window.dataLayer)"


The problem is that when i tried to use the adobeDataLayer i dont have any connection between Tags and the adobeDataLayer you now if this problem is because we use this code or it's any other thing?



2 Replies



Hi @david_92 , 
You need to create datalayer on array format for push method to work. Instead of using "window.adobeDataLayer = Object.assign({}, window.dataLayer)" use "window.adobeDataLayer = Object.assign([], window.dataLayer);"

You can try below code on browser console:
window.adobeDataLayer = Object.assign([], window.dataLayer);
"page": {
"name":"test", //conventional naming format
"URL": "test",


Community Advisor

Using Object.assign() like that might result in an error.

Use this instead:

// create adobeDataLayer
window.adobeDataLayer = window.adobeDataLayer || [];
// push your existing key-value dataLayer into adobeDataLayer
// push any other variables that you want to track into adobeDataLayer
  "event": "pageView",
  "page": {
    "name": "test", //conventional naming format
    "server": "test",
    "URL": "test",