Hi, I work for a company that has been using DTM for a couple of years. We have recently decided to use the ContextHub data layer within AEM instead of a custom solution outside of AEM. After configuring AEM to DTM and adding DTM as a tool at the site level, we are starting to add in Data Elements. We are currently getting the following error. TypeError - ContextHub.getItem is not a function
Can anyone help with this issue?
Solved! Go to Solution.
Views
Replies
Total Likes
Not sure completely. But, have you added ContextHub to the page component? Can you directly access contexthub functions from browser console on the AEM Web-page(s)?
See Adding ContextHub to Pages and Accessing Stores
To enable the ContextHub features and to link to the ContextHub Javascript libraries, include the contexthub component in the head section of your page. The JSP code for your page component resembles the following example:
<head>
<sling:include path="contexthub" resourceType="granite/contexthub/components/contexthub" />
</head>
Reference Read:- Configuring ContextHub
kautuksahni - Any ideas here?
Views
Replies
Total Likes
Not sure completely. But, have you added ContextHub to the page component? Can you directly access contexthub functions from browser console on the AEM Web-page(s)?
See Adding ContextHub to Pages and Accessing Stores
To enable the ContextHub features and to link to the ContextHub Javascript libraries, include the contexthub component in the head section of your page. The JSP code for your page component resembles the following example:
<head>
<sling:include path="contexthub" resourceType="granite/contexthub/components/contexthub" />
</head>
Reference Read:- Configuring ContextHub
Views
Likes
Replies