AEM Integration with DTM - Getting Data Element Error

Antdogg1006

13-06-2018

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?

Accepted Solutions (0)

Answers (2)

Answers (2)

kautuk_sahni

Community Manager

18-06-2018

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