I am trying to setup personalization using geolocation, but it is not working in publish instance.
The behaviour works fine in author instance.
Any particular article that you are following?
Note: ContextHub is not by default aware of the currently logged in user on publish servers and such users are regarded by ContextHub as “Anonymous.” You can make ContextHub aware of logged in users by loading the profile store as implemented in the We.Retail reference site.Refer to the relevant code on GitHub here.
Thanks for the reply.
I don't want ContextHub to be aware of the user. It can be anonymous. I just want it to show the location of the visitor. Depending on which my created segment will resolve. In my segment I am simply comparing the country code which I expect it to be available OOB as part of personalization.
Above example doesn't matches my use case
Solution for me so far is to build a custom store based on the geolocalization one. There is a constraint in the reverse geolocation to the context hub ui. Not sure why. but its there. not configurable as far as I could read in the code.
The summit toy store keeps coming as a reference, but that is conviniently only tested in author environment or using lat/long params which are the only properties available in the contexthub persistance store when viewed in publish. All segments created using any address detail will not be resolved.
Any update on this ?
Am facing the same issue.
Just created a simple segment's for geolocation/address/postalCode.
Working in Author but not in Publish.
I have tried in AEM 6.3, 6.4 & 6.5 instances.
Not that I'm aware. Code in geolocation store do not allow reverse geolocation if ContextHub UI is not available. So publish server will not do reverse geolocation. Any segment done with this properties are not going to work on publish unless you extend this store or create your own.
This is because of lack of access to
Proper fix would be to correct
Here, proper service user needs to be used and access need to be granted accordingly.
Quick Fix: Provide anonymous user access to