Expand my Community achievements bar.

Submissions are now open for the 2026 Adobe Experience Maker Awards.

Mark Solution

This conversation has been locked due to inactivity. Please create a new post.

SOLVED

AEM Targeting (Contexthub) - Avoid default context to 'flash'

Avatar

Level 2

Hi All,

I'm setting up Targeting using ContextHub as the engine for a project and it's pretty much done.

However, I noticed that when an audience matches a defined segment and the ContextHub replaces the default content with the targeted content it looks kinda ugly.

Is there a way to not display the default content for a component if it has a matching segment? I just don't want the end user to see how the default content appears and then when the JS runs it gets replaced with the targeted content. It looks weird.

This is an example of the JS that the contexthub injects.

<script type="text/javascript">

                if (window.ContextHub && ContextHub.SegmentEngine) {

                    ContextHubJQ(function() {

                        ContextHub.SegmentEngine.PageInteraction.Teaser({

                            locationId: '_id_of_my_component',

                            variants: [{..}]

                            strategy: '',

                            trackingURL: null

                        });

                    });

                }

</script>

After that piece of code runs, if the component matches a segment based on the defined traits then the default content is replace with the targeted one.

Is there a way to make this process little bit smoother, and avoid the display/hide of the default content?

Thanks!

1 Accepted Solution

Avatar

Correct answer by
Level 4
2 Replies

Avatar

Level 4

You can be finding da ways here: Authoring Targeted Content Using Targeting Mode

Avatar

Correct answer by
Level 4