This use case example describes how to achieve personalized content based on weather of your location.
The following AEM Screens project leverages AEM personalization which includes the ContextHub, the Segmentation engine and the Content Targeting UI.
This use case delivers content which is personalized based on the current weather in each location, if the weather is:
- sunny, it displays summer clothing
- cold, it displays winter clothing
For demonstration purposes, this use case captures your Geo-location to showcase the content update. You can manually update the Geo-location view the output in different scenarios.
Adding Content to Sequence Channel
- Select the channel (DataTrigger).
- Click Edit from the action bar to open the editor. Drag and drop few assets to your channel.
You must only add the default images to the editor. The images that you want to be replaced, must be added to the editor when you switch to targeting mode in step (6).
Adding ContextHub and Targeting Configurations
- For demo purposes, download the content package below.
- Once you have downloaded the package to your AEM instance, you need to set the ContextHub and Segments Path:
- For ContextHub, set the path to: /libs/settings/cloudsettings/legacy/contexthub
- For Segments Path, set the path to: /conf/data-triggers/settings/wcm/segments
Defining the Targeted Component
- 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 by selecting the variation in the Audiences in the side rail and adjusting the content as needed.
To hide the Assets panel in the editor, you will have to click the left arrow on the right hand side panel, as shown in the figure below.
To showcase, how the image will change, depending on the location and further the temperature of your area, you can manually click the ContextHub icon, as shown below.
As soon as you update the location, the temperature of that area is captured and the image updates with the winter selection and replaces the summer selection image.