Expand my Community achievements bar.

AEM Audiences | ScriptReference Component

Avatar

Level 1

We are looking at the ScriptReference component documentation https://experienceleague.adobe.com/docs/experience-manager-65/administering/personalization/segmenta...

 

In here it provides an example script and states that if properly configured, then when creating an audience and using the ScriptReference component, the dropdown should automatically contain the registered scripts.

 

In a AEM 6.5 out of the box install, one can find the the sample script setup and configured under http://localhost:4502/crx/de/index.jsp#/libs/cq/contexthub/code/kernel/segment-engine/comparison-scr...

 

However, when adding the ScriptReference component to the page for defining the segment, the dropdown is empty. The documentation doesn't indicate anything other than specifying the correct clientlib name which is setup with the out of the box example. Is there a step missing here that we are not seeing ? 

 

Thanks,

Nikhil Patel.

2 Replies

Avatar

Employee Advisor

Hi,

 

It's possible that the ScriptReference component is not properly configured or the correct clientlib is not included on the page. Double check the configuration and ensure that the clientlib containing the script is included on the page.

 

What errors do you observe?

Avatar

Level 1

Manvi,

 

Am using this out of the box, no configuration changes, just adding a ScriptReference component to a new segment that I am creating within the We.Retail audiences, adding the ScriptReference component and then editing it and nothing shows in the dropdown. There are no errors in the browser console nor are there any errors in the logs that I can see. 

 

Yes, as per the documentation I linked in my original question, it states if the properly configured the script will show in the Script Name dropdown. But, that's the issue, the script that comes out of the box does not even show in the dropdown. The documentation references that same out of the box script in terms of instructions, so if that is not working then either the instructions are wrong or incomplete.