Hello Community,
We're using contexthub in our project to personalize the content. Basically, I want to conditionally load the contexthub libraries only when the page (content) is configured with targeting. Whenever the component on the page is configured with targeting, I can see properties (accurateTargeting/location) being added as part of the component node, but I don't see any properties being added in the page's jcr:content. How can I check and load the libraries?
Also, I want to show the preview of the targeting (Persona) in the authoring environment. I can see the targeting resolution happening in the publish/Dispatcher environment, but I want to mimic the same behavior in the authoring environment(i.e selecting the options from the dropdown should resolve the segments and corresponding content should load it in the contexthub preview) so that the authors can preview the persona before publishing the page. Should I implement/introduce the clientlib and add it to the clientlib category (i.e. contexthub.module.sampleclient)? If so, can you share some custom implementation?
Additionally, I'm looking for an existing OOTB store that can detect the viewport of the end-users (i.e. Desktop/Tablet/Mobile). Do we have any existing stores we can leverage, or do we need to create a custom store for this use case?