Skip to main content
shubhamg9400285
New Participant
May 29, 2019

Context hub not working on publish environment?

  • May 29, 2019
  • 25 replies
  • 16781 views

Hi,

I am using context hub for personalization in a component.

for that, I created an audience for chrome users and Firefox users and the activities and so on.

So I authored different content for "default", chrome and firefox audience.

So it is working well and as expected on the author instance.

But when I view the page on PUBLISH environment it is showing default content only and not chrome or firefox content.

Tested on both AEM 6.4 and 6.5

P.S. I have activated page, audience, activities everything.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

25 replies

shubhamg9400285
New Participant
June 6, 2019

Hi Timmy,

Please let me know when you hear anything from adobe regarding this issue.

It will be wonderful if you can just update this thread with your ticket resolution details.

Regards,

Shubham

New Participant
June 6, 2019

Hi Joeb,

        Please read the documentation carefully. It doesn’t say it’s meant only for authors. As I mentioned before its a full fledged mechanism which works on both author and publish before 6.4 repository restructuring.

Only difference is on author you get the tools to simulate the behaviour in the UI module of contexthub so you can check if all the configurations are setup correctly and right audiences are selected but on publish it works only with javascript coz you dont want the end user to keep simulating things.

Also think practically what’s the benefit of having it only in author after doing all the configuration.

Also before 6.4 & 6.5 it was working as per the use case in 6.3 for author and publish.

I have raised the support ticket and adobe has identified it as issue.

I hope I have given you enough info for the same answer

June 5, 2019

The AEM documentation state ContextHub is used when authoring pages. [0]

0. ContextHub

Employee
June 5, 2019

Please log a Daycare support case and report the issue.

Enterprise Support

shubhamg9400285
New Participant
June 5, 2019

Hi Aneet,

I have also tested with a user logged in on publish but still see only default data and not the personalized one.

I have done personlaization based on browser family.

I can see the correct browser family in context hub object in local storage and i am also not logged in as anonymous but as admin.

I am testing all this on we-retail site only.

Timmy's problem and mine are same.

Regards,

Shubham

New Participant
June 5, 2019

I don’t think so. It was full fledged working in 6.3 on on both Author and Publish. Its the out of the box targeting engine if you don’t want to use the enterprise Test n Target solution.

June 4, 2019

ContextHub is a tool that is meant for Author.

New Participant
June 4, 2019

Hey Aneet,

          Yes Im able to get the data. So basically all the scripts are loaded and contexthub is also initialized. I can also see that the data is getting stored into the store.

This is very much identical to the original poster. If I restart my publish instance then it seems to work fine. To check this I also tested this on vanilla 6.4 and 6.5 instance it doesn’t work.

On author instance it also work for 6.4 and 6.5. So something very specific to publisher. Permission is not the issue have already tested that part.

It does work in 6.3. So I think something within the engine got screwed up during repository restructuring from 6.4 onwards.

You can also reproduce this very easily in any 6.4 or 6.5 instance as below.

Create any page under we-retail. Add a title component. And target it with audience male and female. Then I use this to trigger it to check on author and publish which works fine on author and not on publish.

var a = ContextHub.getStore(’profile’);

a.setItem(‘gender’,’male’);

Thanks and regards,

Timmy

Employee
June 4, 2019

Hello timmymathew

Thank you for clarifying. You may be facing something different from the original poster.

Are you able to check the details in the browser's console for loaded Store data? You can execute commands such as the following

ContextHub.getStore("profile").getItem("displayName")

to check if the Profile store is getting populated.

Thank you,

Aneet Arora

New Participant
June 4, 2019

Hi Aneet,

       Issue is not related to the context awareness of logged in users. I also tested it with logging into publish instance with admin account and still its the same issue unfortunately :/

PS : Tested with We-Retail of vanilla 6.5 instance and it's the same issue so not specific to any project or configuration.

Thanks and regards,

Timmy