Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.

AEM Targeting on experience fragment

Avatar

Level 2

I have tried to use AEM targeting within experience fragment, so I have created audience, segments, activity etc... then I have created Header experience fragment and wanted to reconfigure Navigation component to show different links for anonymous and logged in users.

 

Targeting mode is available when authoring experience fragments (even in page properties you have got ContextHub configuration), so I thought it will work fine. However when I open the page where this experience fragment is used I see that page enters into the infinite loop and the "current url" is requested by ContextHub instead of url to campaign or experience fragment.

 

I have investigated in the page source that default segments got incorrect url:

 

{"path":"//default","name":"default","title":"Default","campaignName":"","thumbnail":"/.thumb.png","url":"","campaignPriority":0,"tags":[]}

 

instead something like this

 

{"path":"//default","name":"default","title":"Default","campaignName":"","thumbnail":"/.thumb.png","url":"/_jcr_content/root/container/header/content/experiencefragment.default.html","campaignPriority":0,"tags":[]}

 

 

When I use targeting on the page instead of experience fragment everything works fine. ContextHub is serving the correct fragment for resolved segment.

 

Do you have any idea how to fix it? or how to force targeting to works correctly on experience fragment?

 

 

1 Reply

Avatar

Administrator

I doubt if we can personalize Exp Fragment via contexthub. We can personalize content fragments but not ExP Fragment via Contexthub. Content Fragments are like Assets whereas ExP Fragments are like pages. So, for contexthub we can only change components value but not component type/order/count. I would recommend using Adobe target for it. 

See: http://www.sgaemsolutions.com/2018/12/personalization-using-contexthub-in-aem.html

See: https://experienceleague.adobe.com/docs/experience-manager-learn/sites/personalization/experience-fr... 

 

-Kautuk



Kautuk Sahni