Skip to content

Latest commit

 

History

History

asciicodes

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

ASCII code data-triggers

Use Case

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 product a experience
  • b: switch to product b 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.

Architecture Diagram

ASCII Code Architecture Diagram

How to Use the Sample Content

  1. Open the sequence channel with content based on ascii codes
  2. Switch to Targeting mode
  3. Select Screens HowTo brand and ASCII Codes Based Campaign activity and hit the Start Targeting button
  4. 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
  5. Switch then to Preview mode
  6. Expand the ContextHub which shows the current ASCII information (if not visible).
  7. Click inside the channel so it has focus
  8. Hit various keys on your keyboard and see the content updating:
    • a and b have custom content
    • any other key shows the default content
    • ASCII code is cleared after 10 seconds
    • For now, no simulation is possible

Technical Details

Compatibility

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.

Features built upon

The solution uses:

Manual installation

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

Manual content setup

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.

  1. Create a screens project
  2. Create a new sequence channel for the master sequence
  3. Edit the channel and add assets or components as needed.
  4. 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
  5. Click Save & Close to save your changes
  6. Edit the channel content and switch to Targeting mode
  7. Select Screens HowTo brand and ASCII Codes Based Campaign activity and hit the Start Targeting button
  8. Select the component for which you want to have targeted content
  9. Click the Target button to enable targeting for that component
  10. Define the content for each variation (default, a ASCII code and b ASCII code) by selecting the variation in the Audiences in the side rail and adjusting the content as needed
  11. Switch then to Preview mode
  12. Expand the ContextHub which shows the current ASCII information (if not visible).
  13. Click inside the channel so it has focus
  14. Hit various keys on your keyboard and see the content updating:
    • a and b have custom content
    • any other key shows the default content
    • ASCII code is cleared after 10 seconds
    • For now, no simulation is possible

Adding new segments

  1. 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)
  2. Change the jcr:title and segmentName properties on the jcr:content node
  3. Change the value property on the jcr:content/traits/andpar/eq/right node to the value you want to catch
  4. 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)
  5. Change the jcr:title property on the jcr:content node and adjust the cq:segments so it points to the segment defined above
  6. Edit the channel and adjust the targeted content in Targeting mode

Sample Content Links