What is the recommended way to create our own Contexthub configurations | Community
Skip to main content
Level 3
April 30, 2021
Solved

What is the recommended way to create our own Contexthub configurations

  • April 30, 2021
  • 2 replies
  • 940 views

Hi all,

 

From the warning below we understand we need to create our own contexthub configurations.

My question is how to best do it?

By copying nodes from under /libs/settings/cloudsettings/legacy/contexthub to /conf/[myproject]/settings/cloudsettings/[myfolder]/contexthub?

 

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 Vaibhavi_J

Hi @baoyu_li , 

Yes, you can copy the nodes and create a contexthub with mentioned path. This is one of the way to create. 

conf/[myproject]/settings/cloudsettings/[myfolder]/contexthub

 

Or you can use the tools console to create

 AEM > Tools > Sites > Context Hub

 

Steps are detailed in the below document. Please have a look. 

https://www.initialyze.com/blog/2020/02/context-hub-for-personalization-in-aem-6-5/

2 replies

Vaibhavi_J
Vaibhavi_JAccepted solution
Level 7
April 30, 2021

Hi @baoyu_li , 

Yes, you can copy the nodes and create a contexthub with mentioned path. This is one of the way to create. 

conf/[myproject]/settings/cloudsettings/[myfolder]/contexthub

 

Or you can use the tools console to create

 AEM > Tools > Sites > Context Hub

 

Steps are detailed in the below document. Please have a look. 

https://www.initialyze.com/blog/2020/02/context-hub-for-personalization-in-aem-6-5/

Asutosh_Jena_
Community Advisor
Community Advisor
April 30, 2021

Hi @baoyu_li 

 

You can enable context hub by adding the below line of code in head.html of your page component.

 

<!--/* Include Context Hub */-->
<sly data-sly-resource="${'contexthub' @ resourceType='granite/contexthub/components/contexthub'}"/>
*/-->

 

You can create the context hub configuration by navigating from Tools -> Configuration Browser -> Select the project folder -> Enable Context Hub checkbox.

This will create the basic config here /conf/project/settings/wcm/segments

Now you can add your segment nodes under the above path.

 

Please refer the document below:

https://experienceleague.adobe.com/docs/experience-manager-learn/sites/personalization/context-hub-technical-video-setup.html?lang=en#site-configuration-and-contexthub-segments

 

Thanks!