I need to perform some logic after a targeted component had been rendered on the page. We are using a campaign, segments to display targeted content. Is there a dom event I can listen to to know the personalized component has been added to the page? I have the below code but it no long seem to work.
$CQ('div').on('target-dom-loaded', function(event) { console.debug("******************* target-dom-loaded ****************"); });
This is not documented - i am looking into this.
Views
Replies
Total Likes
try with “teaser-loaded”
Views
Replies
Total Likes
My engine choice is ContextHub and I'm using the default target option on the component. I don't see 'teaser-loaded' getting called either.
Views
Replies
Total Likes
So target-dom-loaded event fires as long as I do not set the engine.
Views
Replies
Total Likes
Hi
Watch this Ask the community experts topic on personalization topic
// https://communities.adobeconnect.com/p9neqyup4j5/?launcher=false&fcsContent=true&pbMode=normal
Hope this might help to you
Thanks,
Ratna Kumar.
Views
Replies
Total Likes
The solution was to target 'segment-engine:teaser-loaded' event.
Views
Replies
Total Likes
'bfvaughn' is correct in that the 'segment-engine:teaser-loaded' is the event fired.
I'm unsure as to whether this event is fired when 'all teasers' are loaded or 'just the first teaser' on a page is loaded.
This event was fired when using the 'Target Component' in AEM 6.2 using the 'ContextHub' Strategy.
The only way I was able to listen to this event inside a clientlib for a component was to use the ContextHub.Eventing as it did not get detected when using a normal jQuery.on() approach.
This is the snippet that worked for me:
window.ContextHub.eventing.on(ContextHub.SegmentEngine.PageInteraction.Teaser.prototype.info.loadEvent, function() {
// for each component that now exists on the page...
});
Regards,
Ed
I am not able to detect "segment-engine:teaser-loaded" event on AEM6.1 SP2 and we have not enabled ContextHub. Any help is appreciated.
Views
Replies
Total Likes
I think this event is fired every time any component is loaded, is it possible to know wich element triggered the event?
Views
Replies
Total Likes
How did you get this code? Any sources we can check? OR just reading the source code?
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies