New cookie trait implementation in the magnolia-personalization-traits submodule.
Older (deprecated) implementation in the magnolia-personalization-compatibility submodule.
Even though in both implementations you can create and use multiple cookies, we recommend using the new implementation since a cookie trait is easily configurable there using the @TraitType annotation.
Cookie trait definition properties
Property
Description
<cookie>
required
Trait name.
The property can be omitted if the definition is done using a YAML configuration file.
The value is taken from the name of the file.
$type
required (module version 2.1.x and higher)
Since you are configuring a cookie trait, use cookieTrait as the value.
The $type property defines the trait type for delivery of personalized content.
The following types are available:
The $type property is only required for the new traits.
It does not need to be configured for the traits that were present in the older (pre-2.1) versions of the Personalization module:
date
cookies
country
visitor
All of these pre-configured traits are now provided by the magnolia-personalization-compatibility submodule.
Due to session security restrictions, the country trait can only be used if Magnolia and an SPA application are on the same domain.
ruleField
required
Field used to define permitted values for the trait.
The options display in the Choose audience dialog.