Magnolia 5.3 reached end of life on June 30, 2017. This branch is no longer supported, see End-of-life policy.
Personalization means adapting content to the visitor according to his or her personal preferences, needs and capabilities. A personalized website is more relevant and engaging than a static non-personalized site. Personalization turns a static pull experience into an interactive push relationship – the visitor indicates their interest and the website pushes matching content. Of all possible content variants that could be offered, personalization helps you serve the content that fits best. Content tailored to the visitor has a better chance of making a sale or persuading the visitor to stay longer. Magnolia 5.3+ EE Pro
Once you are familiar with Magnolia's personalization mechanism, do a hands-on exercise in My first personalized campaign.
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.
Variants are created in the same app where the original content element was created. For example, page variants are created in the Pages app.
Here are two variants of the Standard Article page. The first variant is targeted to previous buyers, the second to new visitors. The original page carries a special variant iconwhich tells you this content has alternatives.
Variants are displayed under the original page but they are not children. They are copies. Variants don't inherit inheritable components from the original page, for example. Think of variants as "swaps" that take the place of the original page when personalization rules match.
In Magnolia 5.3 variants are limited to pages but in upcoming releases you will be able to create variants of other content elements such as assets.
In order to personalize content you need to know something about the visitor. In Magnolia, we call that something a trait. A trait is an attribute of the visitor or visit that you can detect and assign a value to. For example, age is a trait. It tells you if the content is appropriate for the visitor.
Think of traits as characteristics of the visitor's persona:
Here are some traits commonly used for personalization:
Magnolia provides three traits out of the box:
You can also create your own traits.
You may have heard about explicit and implicit personalization. In Magnolia you can do both. It depends on the trait.
You can mix explicit and implicit traits. For example, you can ask users to declare their gender explicitly but then use implicit behavioral analysis to find out what products they like. Similarly, you can collect a given trait using either method: you could analyze visitor behavior to figure out if they are interested in movies or you could just ask them. The difference between explicit and implicit traits is really just academic.
Magnolia's personalization is rule based. Rules push relevant content to the front and filter irrelevant content out. Rules can be based on any trait you can reliably detect and analyze, such as profile attributes, preferences, past behavior, search terms, or interests.
To create a rule, define permitted values for a trait. For example, "Age >= 18" is a rule. When a visitor is 20 years old, the rule is met and personalized content is served.
Examples of rules:
You can choose the audience for a content variant in two ways:
You can use segments and local rules at the same time. One of the segments and all the local rules must be true for audience to match. Then the content variant is served.
Think of segments having an OR condition and local rules an AND condition.
audience matches IF date = 2015-10-05 AND weather = sunny AND (segment = "German visitors" OR segment = "Returning visitors")
To simplify the process of assigning rules, you can divide the entire visitor population into segments. A segment is all the visitors who meet a given rule. This means that people in the segment have common needs and priorities. It must be large enough to be measurable, stable over time, reachable and responsive. These qualities make the segment a meaningful target audience for repeated campaigns.
Examples of segments and the rules that define them:
All traits of a segment are combined with a logical AND constraint:
segment matches IF trait 1 matches AND trait 2 matches AND trait 3 matches AND ...
Persona is a hypothetical visitor who represents the target audience. The persona has the same goals as other visitors in a segment group. Use personas together with segmentation to test content variants. If a variant makes sense for the persona then it is suitable for everybody in the same segment.
Describe the persona in a short paragraph that explains their behavior, needs and goals. Add a few fictional personal details to make the persona a realistic character. A realistic persona belongs to more than one segment at the same time. For example, a persona can be interested in both music and technology at the same time.
Use personas to preview content variants. Personas are helpful because they put a personal human face on otherwise abstract data about visitors. By thinking about the needs of a fictional persona you can better infer what a real person might need.
Magnolia does not cache personalized pages. If a page has a variant then the page will not be cached. Caching such pages would be problematic because the variant that is served first would be served to all subsequent visitors.
The Personalization module changes cache configuration during installation. It replaces the default cache policy with a new policy and a new cache store. This results in bypassing cache for pages that have variants or are personalized.
If this solution does not work for you, customize the cache key to include your traits. Be aware that a customization likely only works if the majority of your pages are personalized and you have a small amount of traits and those traits have a small number of allowed values. The Date trait is already problematic as it allows a large number of values. Even using only 2 traits with 2 allowed values would increase the cache size by a factor of 4. We don't recommend going this route. Magnolia plans to implement a personalization-friendly caching mechanism in the future which allows you to cache pages with variants while maintaining a reasonably sized cache. Trait detectors would be executed before the cache filter.
If you want to use a personalization engine of an external system, look how it's done for Customer segments in IBM WebSphere Commerce Integration module or see the example how to retrieve traits from SugarCRM Connector.