How to add a new trait in Segmentation for my teaser such that teaser will be shown to specific User's group , and also Is there any way to execute java code as part of segmentation.
Some one please help on this.
Regards,
Madhav
Solved! Go to Solution.
You can customize a component that is used with segmentation to call a Java class that is bundled in an OSGi service. Like all AEM components -- they can be customized to meet your requirements.
Views
Replies
Total Likes
You can customize a component that is used with segmentation to call a Java class that is bundled in an OSGi service. Like all AEM components -- they can be customized to meet your requirements.
Views
Replies
Total Likes
I'm not sure about the Segmentation, but there does not seem to be an out-of-the-box way to define a segment based on user group. I suppose you could add the information to the client context [0] when the user logs in, and then use the Generic Store Property to access it in the segment [1].
For executing java based on segment, the Target component does that for content components. [2]
scott
[0] http://dev.day.com/docs/en/cq/current/developing/client_context_detail.html
[1] https://dev.day.com/docs/en/cq/current/administering/segmentation.html
[2] http://dev.day.com/docs/en/cq/current/wcm/content-targeting.html
Thanks. Can you please provide some more info on this. Actually we need to show different promotions to different groups based on logged in user .
Please provide any insight on this.
Views
Replies
Total Likes
We need to show promotions based on user groups.
The client context was customised to add a custom property and then used the Generic Store Property to access it in the segment.
The newly added custom property, gets loaded as expected in the client context.
But on the initial load of the client context, the teaser segment is not resolved correctly (With the custom attribute value).
Once some changes are done in the client context, the teaser segment gets resolved correctly.
Are some configuration changes required so that the teaser segment gets resolved correcly on the initial load.
Please provide an idea on this regard.
Highly appreciate if we could get any other approach to show promotions based on user groups.
Views
Replies
Total Likes
Thanks, Scott. i ll try that.
One small question whenever open client context ,it is not showing logged in user's data after manually load context then only showing. Please give any idea on this.
Views
Replies
Total Likes
smacdonald2008 wrote...
You can customize a component that is used with segmentation to call a Java class that is bundled in an OSGi service. Like all AEM components -- they can be customized to meet your requirements.
I have added new property (role) in trait.jsp like gender..etc and configured segmentation, campaigns. can I know detailed changes need to be done(customization of personalization/clientstores/profiledata/init.js.jsp) for loading specific teaser for specific role in AEM 5.6.
Views
Replies
Total Likes
Manjunath DJ wrote...
smacdonald2008 wrote...
You can customize a component that is used with segmentation to call a Java class that is bundled in an OSGi service. Like all AEM components -- they can be customized to meet your requirements.
I have added new property (role) in trait.jsp like gender..etc and configured segmentation, campaigns. can I know detailed changes need to be done(customization of personalization/clientstores/profiledata/init.js.jsp) for loading specific teaser for specific role in AEM 5.6.
Hi smac thanks for your reply.
I am successfully able to load teaser based on role with customization of personalization/clientstores/profiledata/init.js.jsp.
but still am facing below issue kindly please help me out on this:
I am trying to customize teaser.jsp which can read multiple campaign path from page property instead of single campaign path.
JSONObject teaserInfo = targetedContentManager.getTeaserInfo(resourceResolver, campaignPath, location);
here am passing different campaignPath by looping length of campagin path which i get from page property.
am able to pass the value of "allTeasers" to initializeTeaserLoader
initializeTeaserLoader(<%=allTeasers%>, "<%=strategy%>", "<%=targetDivId%>", "<%=(WCMMode.fromRequest(request) == WCMMode.EDIT)%>", "<%=trackingURLStr%>", "<%=resource.getPath()%>");
but when am loding a page with teaser and teaser's component is loading but with embeded style "display:none"(html markup teaser is attached)
in web -page console am getting following error:
Here i found that normal components like text/text image are rendering correct teasers resolving segments when page is loading but if customized components which have ajax call are not working(am getting above error) but still i can see html markup teaser is attached. i am using jquery version 1.8.2 .not sure whats happening with /libs/cq/personalization js
Views
Replies
Total Likes
I never noticed that myself, until now :)
I am trying to find an answer for you.
scott
Views
Replies
Total Likes
i was able to resolve this issue" EOF error" component level js had comments "//comments" which were not readable by teaser.js and it was blocking the execution.
Views
Replies
Total Likes