Magnolia 6.0 reached end of life on June 26, 2019. 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.
Page personalization is an Enterprise Standard and Enterprise Pro feature; component personalization is an Enterprise Pro feature.
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 three variants of the Travel demo Contacts page. Each variant targets users from a different region. The original page has a special variant icon which 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.
Content variants are not limited to pages only. You may also create a variant of a component within a page. Component personalization makes personalizing content easier because it allows the editor to personalize content in a scalable way. A page may in some cases feel like too big an item to personalize. Personalizing the whole page would mean copying a lot of redundant content if only a small portion of the page content has to be personalized.
For example, the page editor may want to set different contact hours for the visitors from Europe+Africa and for the visitors from the Middle East by adding just one short line of text to the whole page. This can be achieved by creating two variants of the Text and image component which forms a part of the Contact page in the Travel demo:
The page containing the component variants is then marked with the variant icon.
Adding content variants to a page component does not produce a copy of the whole page.
Personalization of components is enabled in Magnolia EE Pro by default but it you can disable or restrict it.
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 four traits out of the box:
Visitor: Allows you to detect if a visitor is new, registered or logged in. For example, greet a logged-in visitor by their name.
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 = 2019-05-015 AND weather = sunny AND (segment = "Americas 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 match the rules. This means that people in the segment have common needs and priorities. A segment must be large enough to be measurable, stable over time, reachable and responsive. These qualities make a meaningful target audience for repeated campaigns.
Examples of segments and the rules that define them:
The traits of a segment can be combined with either a logical AND or a logical OR:
segment matches IF trait 1 matches AND trait 2 matches AND trait 3 matches ...
segment matches IF trait 1 matches OR trait 2 matches OR trait 3 matches ...
Example: The segment below serves content only if ALL of the three traits match: the user has logged in, comes from the United States, and accesses the content on 4 July 2020.
Persona is a hypothetical visitor who represents the target audience. The persona has the same goals as other visitors in the segment. Use personas together with segmentation to test content variants. If a variant makes sense for the persona then it makes sense 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 can belong 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 human face on abstract data about visitors. By thinking about the needs of a fictional persona you can better infer what a real person might need.
Caching increases the performance of transferring data repeatedly. In Magnolia, you can cache personalized pages and components with Enterprise Edition Pro using the Advanced Cache for Personalization (ACP) module. The module caches content variants automatically.
Without the ACP module, cache is bypassed for any content that has variants. The Personalization module changes cache configuration during installation. It creates a
/modules/cache/config/contentCaching/defaultPageCache/cachePolicy/ttlVoters/PersonalizedContentTtlVoter@class property and sets it to
In Magnolia EE Standard, personalized pages are not cached. Cache will generate a non-cacheable entry under the cache key representing page with variants and therefore effectively disables the caching of variants.
In Magnolia EE Pro, page variants are cached automatically. Magnolia generates cache entries for each page variant and includes trait information in the cache keys. Component variants are cached with the Advanced Cache module.
Caching of a page containing component variants means that a separate version of the page is cached for each component variant when the component variant is requested. For example, if a page contains two personalized components (A and B), each component has two variants (A1, A2, B1, B2), and if the combination A1 + B2 is valid for a visitor, this combination will be stored in the cache.
|Cache feature||CE||EE Std||EE Pro||Note|
|Caching of normal pages|
|Caching of personalized pages||Available with any EE Pro 6.0+ bundle.|
|Caching of pages with personalized components|
In EE Pro 6.0+, included in all bundles.
First matching variant wins. If two or more variants match the rules, Magnolia serves whatever variant is first under the parent page. This is important to understand when troubleshooting why your variant is not served. Is another matching variant in a higher position? Move your variant higher.
A page and its variants are linked via UUID. Each variant has a
mgnl:variationOf property whose value is the parent page UUID. The property links a variant to its parent. This is important to understand when you export variants to other Magnolia instances for testing. The page you export from and the page you import to must have the same UUID, meaning the original page must exist in the target instance. Publish or export the original page to the target environment first.
Pages that have variants have a special mixinType
mgnl:hasVariant. You can only import variants to a page that already has variants. The
variants node must exist under the target page. You cannot import a variant under a page that has no existing variants as it won't have the necessary mixinType
If you want to use the personalization engine of an external system, see the example of how to retrieve traits from SugarCRM Connector.