Data layer values are coming as 'null' in the Edge Network- Analytics Web SDK setup | Community
Skip to main content
Level 2
April 16, 2024
Solved

Data layer values are coming as 'null' in the Edge Network- Analytics Web SDK setup

  • April 16, 2024
  • 1 reply
  • 2843 views

I am configuring analytics web SDK setup for one website where ACDL is implemented. In the console, I can see the data layer values populating in the data layer. However, the values are coming as 'null' when sending Web SDK events.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by bjoern__koth

In the same place that the satellite var was tested, you can also test the Data Layer...

 

console.log(adobeDataLayer); // or console.log(adobeDataLayer[0]); // or console.log(adobeDataLayer[0].data); // or console.log(adobeDataLayer[0].data.loginMessage)

 

Basically, test at various levels your data layer and make sure that your reference is actually working.... 


Hi @firefighteradi 

in addition to what @jennifer_dungan wrote, it's maybe worthwhile testing this in your console.

 

adobeDataLayer.getState("data.loginMessage")

 

 

Should there have been any other previous push to the data layer, your access to index 0 will obviously not work.

 

However, since you do not seem to use an eventInfo subobject, the pushed data is aggregated into the so-called computed state (whereas anything pushed into an eventInfo sub-object would only be processable during this specific ACDL push event).

 

 

// push to computed state adobeDataLayer.push({ data: { loginMessage: "foo", } }); // read from computed state adobeDataLayer.getState("data.loginMessage"); // returns "foo"

 

 

Should this work, I would suggest to change your data element "Login Message- DMS Web" from type "Javascript Variable" to the "Adobe Client Data Layer" extension's "Data Layer Computed State" type with "path.loginMessage" as path value.

 

Maybe check out Andy Lunsford's Adobe Client Data Layer's cheat sheet to get a better understanding.

 

Cheers

Björn

1 reply

cserrurier
Level 2
April 16, 2024

Hello,

Thanks for your message. It is hard to answer your question without any context.
Can you describe the way you populate your XDM Schema ?

Best regards

Level 2
April 16, 2024

Hello,

 

Thanks for your reply.

 

I am populating the schema through data element.

 

 

and then sending the event through rule.

 

 

cserrurier
Level 2
April 16, 2024

Hello,

Theoretically, you have done everything right. 
Now, you have to figure out if the data in the dataLayer is ready when the rule is sent.
I advise you to use the "eye" function in the Console with the following code "_satellite.getVar('Login Message- DMS Web')" and control if the dataElement is populated when you need it.

Best regards