Acme Corp is a DIY retail store. In various areas of its stores, the company has shelves with electric tools (i.e. drills, screwdrivers, saws, etc.) and a bid screen showing product information when any of the tools is lifted up from the shelves. For instance, if the customer picks up the latest Bosch percussion drill, the screen will start playing a marketing video for it and also show some technical informations for the product. If the customer then picks up another drill, say the Makita one, the screen switches to the relevant product information.
This how-to project walks you through how to achieve this using a combination of ASCII code events and AEM's Personalization and Content Targeting feature.
The project has a master sequence with a single targeted text component. Depending on keyboard events that are received, the content will switch to various content variations:
a
: switch to producta
experienceb
: switch to productb
experience- anything else: switch to the default experience
The keyboard ASCII code events mimic the activation of a switch, that could be located in store shelves, which triggers a video playback when a customer picks up a product off the shelf.
- Open the sequence channel with content based on ascii codes
- Switch to Targeting mode
- Select Screens HowTo brand and ASCII Codes Based Campaign activity and hit the Start Targeting button
- Explore the different content variations by switching the different Audiences and edit the content as needed
- The default content
- The content for the
a
ASCII code - The content for the
b
ASCII code
- Switch then to Preview mode
- Expand the ContextHub which shows the current ASCII information (if not visible).
- Click inside the channel so it has focus
- Hit various keys on your keyboard and see the content updating:
a
andb
have custom content- any other key shows the default content
- ASCII code is cleared after 10 seconds
- For now, no simulation is possible
AEM version | Compatibility | Comments |
---|---|---|
6.3 | ✅ | |
6.4 | ❗ | While ASCII-code based content should be working, some bugs have been raised regarding segments authoring and ContextHub administration. |
The solution uses:
- the ContextHub
- the Segmentation engine
- the Content Targeting UI
- a standard Sequence Channel
This module requires HowTo project and is part of the install process. Follow instructions here.
If you still want to install the module individually, you can run:
mvn clean install content-package:install
Start by familiarizing yourself with the concept of Personalization and Authoring Targeted Content Using Targeting Mode for Sites.
Note that we won't be describing how to create the custom ContextHub Store and its Content Targeting UI, nor the Personalization Segments and Personalization Audiences setup as the steps will vary in the various AEM versions and links to the documentation have been provided above in the Features built upon section.
- Create a screens project
- Create a new sequence channel for the master sequence
- Edit the channel and add assets or components as needed.
- Edit the channel properties and click the Personalization tab
- set ContextHub Path to
/etc/cloudsettings/screens-howto/contexthub
- set Segments Path to
/etc/segmentation/contexthub/screens-howto
- set ContextHub Path to
- Click Save & Close to save your changes
- Edit the channel content and switch to Targeting mode
- Select Screens HowTo brand and ASCII Codes Based Campaign activity and hit the Start Targeting button
- Select the component for which you want to have targeted content
- Click the Target button to enable targeting for that component
- Define the content for each variation (default,
a
ASCII code andb
ASCII code) by selecting the variation in the Audiences in the side rail and adjusting the content as needed - Switch then to Preview mode
- Expand the ContextHub which shows the current ASCII information (if not visible).
- Click inside the channel so it has focus
- Hit various keys on your keyboard and see the content updating:
a
andb
have custom content- any other key shows the default content
- ASCII code is cleared after 10 seconds
- For now, no simulation is possible
- Copy over one of the default segments (i.e. http://localhost:4502/crx/de/index.jsp#/etc/segmentation/contexthub/screens-howto/screens-howto-ascii-a)
- Change the
jcr:title
andsegmentName
properties on thejcr:content
node - Change the
value
property on thejcr:content/traits/andpar/eq/right
node to the value you want to catch - Copy over one of the default campaigns (i.e. http://localhost:4502/crx/de/index.jsp#/content/campaigns/screens-howto/master/asciicodes-based-campaign/ascii-a)
- Change the
jcr:title
property on thejcr:content
node and adjust thecq:segments
so it points to the segment defined above - Edit the channel and adjust the targeted content in Targeting mode
- Content
- Rules / Segments (access: Navigation > Personalization > Audiences)
- ContextHub (access: Tools > Sites > ContextHub > screens-howto > ContextHub Configuration)