Magnolia 5.5 reached end of life on November 15, 2019. This branch is no longer supported, see End-of-life policy.
In this tutorial you learn how to personalize content. You will target content to visitors from a particular country during a specific period of time. You learn how to create page variants and how to choose an audience. You also test the campaign with the Preview app.
Before you start:
Various festivals are held in different countries on different dates throughout the year. Create a personalized campaign that promotes the Puck Fair festival to U.K. visitors and the Dragon Boat Festival to Chinese visitors.
|Target country||(none)||China||United Kingdom|
|Run dates||(none, ongoing)||May 26 to June 9, 2016||July 27 to August 10, 2016|
|Component title||Festivals||Dragon Boat Festival||Puck Fair|
Experience diverse cultures at their most festive. Join in the fun of festivals around the world with our exclusive festival tour packages.
The Dragon Boat Festival is also known as the Duanwu Festival. It is a traditional holiday that commemorates the life and death of the famous Chinese scholar Qu Yuan. The festival occurs on the fifth day of the fifth month on the Chinese lunar calendar.
On August 10, a three-day festival known as Puck Fair is held in Killorglin, Ireland. Residents of the town capture a goat and proclaim it to be the King for three days of revelry.
festivals.jpg photo by Stewart White
dragonboat.jpg photo by Iidxplus
kingpuck.jpg photo by Buck Lewis
Create a new page in the Travel demo site:
/traveland click Add page.
festivalsand select the Travel Standard template.
A variant is an alternative content element that replaces the original element in personalized content delivery. Magnolia serves the variant instead of the original element when personalization rules match. A variant is a copy of the original element, edited to best suit the intended audience.
Create two variants of the Festivals page:.
Magnolia creates two variants. The system also marks the original page with the variant icon. This icon tells editors that the page has alternative content.
Choose an audience for the Chinese variant:
Chinese Dragon Boat Festival Travelers.
China. This rule serves the variant to visitors from China.
Choose an audience for the U.K. variant:
U.K. Puck Fair Travelers.
Personalize the page variants:
Test the campaign in the Preview app. Impersonate Chinese and U.K. visitors and verify that the correct content variant is served.
Publish all modified content and configuration to the public instance:
Test variant delivery on the published website. You can pass traits as parameters in the URL. This is a handy way to test scenarios that would otherwise be difficult to reproduce such as requesting the page from a Chinese IP address.
Use the following format:
|Identifies the parameter as a preview parameter. Parameters used for personalization have a special prefix that sets them apart from other parameters. The default prefix is |
|Name of the parameter with first letter capitalized, for example |
|Parameter value in a valid format. The format depends on the parameter. For the country trait the value is a two-letter country code (|
Example: Visitor from China on May 26, 2016:
Example: Visitor from the U.K. on July 27, 2016: