AEM Personalization with contexthub | Community
Skip to main content
mohitg4140898
December 17, 2019
Solved

AEM Personalization with contexthub

  • December 17, 2019
  • 2 replies
  • 2692 views

I have created one carousel component which is working fine when targeting is not applied but after applying targeting, its javascript is not loading or working fine. carousel's slider is not working.

 

Can anyone suggest me something?

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 Dipti_Chauhan

Hi,

   You need to again initialize you JS on context Hub Teaser loaded event.

e.g

window.ContextHub.eventing.on(window.ContextHub.Constants.EVENT_TEASER_LOADED, function () {

//INITIALIZE HERE

}

 

Thanks

Dipti Chauhan

2 replies

Dipti_Chauhan
Community Advisor
Dipti_ChauhanCommunity AdvisorAccepted solution
Community Advisor
December 17, 2019

Hi,

   You need to again initialize you JS on context Hub Teaser loaded event.

e.g

window.ContextHub.eventing.on(window.ContextHub.Constants.EVENT_TEASER_LOADED, function () {

//INITIALIZE HERE

}

 

Thanks

Dipti Chauhan

sunjot16
Adobe Employee
Adobe Employee
December 17, 2019

* Do you see any Console errors or 4xx/5xx status requests in Network tab in Developers Tool?

* Did you add ContextHub to the Page component as follows?:

https://docs.adobe.com/content/help/en/experience-manager-learn/sites/personalization/context-hub-technical-video-setup.html#adding-contexthub-to-a-page-component

* Could you please confirm whether you setup ContextHub for Personalization as per: https://docs.adobe.com/content/help/en/experience-manager-learn/sites/personalization/context-hub-technical-video-setup.html ?