The data elements are being populated. correctly "_satellite.getVar('Page: Hierarchy Level 1') = index" and error are triggering in console related to data elements why?
I got this error message:
Failed to execute data element module gcoe-adobe-client-data-layer/src/lib/dataElements/datalayerComputedState.js for data element Page: Hierarchy Level 1. t.getState is not a function
TypeError: t.getState is not a function
Please refer below screenshot.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
When you say that the Data Element is populating correctly
The data elements are being populated. correctly "_satellite.getVar('Page: Hierarchy Level 1') = index"
Is that when you manually run them in the console?
Are those errors happening during the loading of your site... is it possible there is a timing issue, where you are trying to get your hierarchy too soon and it errors out, but by the time you manually run your Satellite getVar code, everything is ready and it works?
Have you tried enabling the Satellite Debug Mode?
// Turn on Debugging:
_satellite.setDebug(true);
// Turn off Debugging:
_satellite.setDebug(false);
To try and see what rules are firing when and in what order... you could also try adding some additional debugging code in your implementation to try and see what is failing where.
Hi @Jennifer_Dungan , Thanks for the reply
_satellite.setDebug('true') --> error are populated.
_satellite.setDebug('false') --> No errors
If error are populated for data elements but data is collecting into eVars. How?
I noticed after data elements error, [Adobe Client Data Layer] Initializing adobeDataLayer as it wasn't found during the initialization.
Is this something to do with data elements error?
HI @reddy_y-11
interesting, as it seems, you are having the Adobe Client Data Layer extension installed, correct?
As you have pointed out, the automatic initialization of the adobeDataLayer happens later, which is an indication, that at this stage, the underlying page has not yet defined it by itself e.g., there is no such line from your end before the launch script, correct?
window.adobeDataLayer = window.adobeDataLayer || [];
Anyway, the error seems indicate that it is already evaluating a data element before this extension activation has even happened.
Is there a URL where this can be looked at?
[Update] after checking with @reddy_y-11 , my assumption in
Approach to circumvent/fix this
@reddy_y-11 in the sample URL you sent me, you may want to mark the first data push to the ACDL with a specific event such as "initial_data" and could listen to this to trigger the AA initialization.
Cheers
Thanks @bjoern__koth!
Yeah, checking that screenshot, the JS errors are happening really soon in the execution (before , which aligns with my initial assumption that it was a timing issue. The code trying to pull the hierarchy was happening before everything was ready.
As you said Bjoern, we can't do much to the timing of the Data Layer, but maybe the timing of the Hierarchy code could be adjusted? Without seeing the implementation I don't know immediately offhand how to do that, but I have done some creative solutions in my own implementation to get around different timing issues....
Since I didn't get the sample URL, I can't see what you saw, so I am not sure if the Data Elements are still properly populating in the tracking (as in the code tries to set multiple times, and this error is thrown only for the initial attempt)... if that is the case, a try/catch around the block of code and some extra checks for "does this function exist yet, etc might be enough to prevent the errors from actually firing, but that is only if the code is eventually succeeding and this is a bit of a cosmetic fix.
Views
Replies
Total Likes