Personas

Last Updated: Aug 9, 2021
documentation for the dotCMS Content Management System

Personas in dotCMS are used to define and identify various types of users who may be interested in different types of content on your web site. dotCMS allows you to specify different Personas, automatically assign site Visitors to Personas, and display different content to users based on their assigned Personas.

Adding and Editing Personas

Personas are implemented in dotCMS as content. Personas may be created, modified, copied, displayed and searched for in the Content tab.

Personas in the Content tab

Note: Personas are intended for use by backend users only, and as such do not support multi-lingual versions. You may only create Personas in the default language for your dotCMS site.

Default Content Fields

By default, each Persona includes the following information:

FieldDescription
Persona NameThe name of the Persona. Note that this is only displayed to content creators, not site users.
Key TagA unique tag for the Persona, used to identify the persona in Rules and code. See Personas and Tags, below.
Picture(Optional) A photo or other image used to represent this type of user. Using photos or other images is often helpful to provide a visual cue to the content creators.
StoryA story (or description) of what kind of user this is, why they would be using your site, and what kinds of content they're likely to be interested in.
Other TagsOther tags associated with this Persona. See Personas and Tags, below.

Standard Persona Fields

Persona Content Type

Since Personas are Content, the Persona Content Type can also be used to extend Personas. You may create multiple Persona Content Types, and you may add fields of your choice to each Persona Content Type to support any additional information you wish to be associated with different types of Personas. To view, add and edit Persona Content Types, select Persona from the list of Base Content Types in the Content Types tab.

The Persona Base Content Type

For more information on adding fields to a Content Type, please see the Adding Fields to a Content Type documentation.

Personas and Tags

Tags are used with Personas in two ways:

  1. The Persona Key Tag can be added as a tag on any piece of Content.
  2. Each Persona has an Other Tags field which contains tags associated with the Persona.
    • All of the tags in this field are automatically added to a Visitor's accrued tags when the Persona is assigned to the Visitor.
    • These tags can thus be used to select and sort content more likely to be of interest to users of this type.

The main differences between these two types of tags are:

  • The Key Tag may be added to specific content.
    • Matching Key Tags will be displayed in the Suggested Tags popup when adding Tags to content.
      Persona Key Tags in the Suggested Tags popup
    • Persona Key Tags have a large impact on scoring.
      • The $dotcontent.pullPersonalized method gives a greater weight to content tagged with the Key Tag of the Visitor's currently assigned Persona than to content tagged with values from the Persona's Other Tags field.
  • Tags in the Other Tags field are more persistent.
    • These tags are added to the Visitor object, so the tags will remain in the Visitor's accrued tags even after the Visitor has been assigned a different Persona.
    • In contrast, tags matching the Key Tag will only match the Visitor's currently assigned Persona.
      • The Key Tag will no longer match after the Visitor's Persona is changed.
  • The Other Tags field is treated like any other tag field, but the Key Tag field is not.
    • Tags in the Other Tags field are automatically added to the Tag Repository and can be managed via the Tag Manager, just like any other tags.
    • The Key Tag does not appear in any Tag Repositories, and can not be managed via the Tag Manager.

The Default Persona

All Visitors to your site are identified as a Persona, and all content is displayed to the user based on your defined Rules and the assigned Persona for that user. When a user has not been assigned a specific Persona, dotCMS identifies them as a Default Persona.

The Default Persona is a Persona which does not explicitly match any of your created Personas. But the Default Persona does not exist as a Content item, so you can not assign values to or read values from the Persona Content fields of the Default Persona as you can with other Personas. However you can identify that a user has been assigned as a Default Persona by checking the value of the Visitor's Assigned Persona, either through Rules or code.

One common use of the Default Persona is to create Rules which assign a new Persona to a user, but only if the user has not already been assigned a specific Persona. To do this, add a Condition to your Rule which checks the existing Persona (in addition to other rules), and only trigger the rule if the user's Persona is “Default Persona”.

The Default Persona is also the Persona used by default when viewing Pages in the dotCMS backend.

Assigning Personas to Visitors

Personas may be assigned to Visitors using Rules. The Set Persona Action may be added to any Rule to assign a specific Persona when the Rule's Conditions are met. This allows you to assign Personas based on considerations as simple as identifying mobile users, or more sophisticated Rules combining any number of the Conditions supported by the Rules Engine.

Although only one Persona may be assigned to a Visitor at any time, you may assign a different Persona to a Visitor at any time if the Visitor meets the Conditions of a different Rule that uses the Set Persona Action.

Viewing Pages as a Persona

When viewing pages in the dotCMS Page editor, dotCMS always displays the Page as it would be displayed to a specific Persona. By default, dotCMS displays Pages as they will be seen by the Default Visitor. The Persona that is being used to display the page is shown in the Viewing as section of the Page editor side bar.

The Viewing As section of the Page Edit side bar

Changing the Viewing as Persona

To change which Persona is used to display the page, you may select from the menu in the Viewing as section.

Choosing the Persona to View as

The Persona Cache

The page view for each Persona is cached independently so that the cached view of a page for one Persona does not affect the cached page view of another Persona.

The Persona REST API

Personas may be created and modified using the REST API. REST API access to Personas is performed in two different ways; For more information, please access the following documentation sections:

On this page

×

We Dig Feedback

Selected excerpt:

×