Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

AEM ContextHub and dynamic dataLayer

Avatar

Avatar
Boost 1
Level 1
olenan46316709
Level 1

Like

1 like

Total Posts

6 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile

Avatar
Boost 1
Level 1
olenan46316709
Level 1

Like

1 like

Total Posts

6 posts

Correct Reply

0 solutions
Top badges earned
Boost 1
View profile
olenan46316709
Level 1

26-03-2018

Hello,

I'm using AEM ContextHub within DTM for the first time, and facing the following issue:

  • AEM ContextHub tool contains a full dataLayer schema
  • However, the dataLayer itself is dynamic, and certain objects do not populate right away
  • This causes multiple "SATELLITE: TypeError - Cannot read property 'xxx' of undefined" errors in the console.

Is there a way to prevent these errors and to, somehow, indicate in the AEM ContextHub tool that dataLayer loads dynamically?

Thank you!  

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Boost 5
Level 3
aseelund
Level 3

Likes

18 likes

Total Posts

33 posts

Correct Reply

12 solutions
Top badges earned
Boost 5
Boost 3
Boost 10
Boost 1
Applaud 5
View profile

Avatar
Boost 5
Level 3
aseelund
Level 3

Likes

18 likes

Total Posts

33 posts

Correct Reply

12 solutions
Top badges earned
Boost 5
Boost 3
Boost 10
Boost 1
Applaud 5
View profile
aseelund
Level 3

02-04-2018

use defensive coding in your data elements when referencing data layer object properties, to see if the data object properties exist before you try to reference them.

Also, dispatch a browser event when the object is added to the array and pass the data in an object with the event. Listen for this new event with DTM

Answers (0)