Context

Uniform Context provides two services to your applications:

  1. Classification - the ability to group or segment visitors based on their interests & behaviors.
  2. Personalization - the ability to customize the components & content displayed to the visitor based on how they're classified.

The manifest describes the parameters the Uniform tracker uses during the classification process. The settings included in the manifest are defined in a Uniform project under the sections Personalization and Testing.

The manifest is generated using the Uniform CLI.

Enrichments are described using a specific format. The following is an example of a JSON object that represents this format:

{ "cat": "1", "key": "1", "str": 50 }

In English, this object instructs the Uniform tracker to add 50 points to the enrichment value with the ID 1 from the enrichment category with the ID 1. The way the tracker handles this instruction depends on the configuration of the enrichment itself, which is described in the manifest.

For example, the following manifest limits the value of the score for enrichment category with the ID 1 to 100 points:

{ "project": { "pz": { "enr": { "1": { "cap": 100 } } } } }

The manifest above is a representation of configuration from the Uniform dashboard. The following is an example of the configuration for an enrichment category with the ID 1 whose score is limited to 100:

enrichment-category-definition
Example configuration of an enrichment.

Enrichments are usually associated with content, therefore they are usually configured along with content. Uniform provides integrations that allow content authors to be able to configure them within with standard authoring tools. Enrichments can also be associated with compositions using Uniform Canvas.

FieldDescription
Cookie nameName of the cookie whose value is compared.
ComparisonDetermines how the cookie value is compared to the value specified for Match.
MatchThe value the cookie value is compared to.
Case sensitiveIf selected, the comparison is case-sensitive. If not selected, the comparison isn't case-sensitive.
FieldDescription
ComparisonDetermines how the current URL is compared to the value specified for Match.
MatchThe value the current URL is compared to.
Case sensitiveIf selected, the comparison is case-sensitive. If not selected, the comparison isn't case-sensitive.
FieldDescription
ComparisonDetermines how the current URL is compared to the value specified for Match.
MatchThe name of the event to check for.
Case sensitiveIf selected, the comparison is case-sensitive. If not selected, the comparison isn't case-sensitive.

There are no configuration settings for this criteria type. This acts as a container that you add other criteria types to. This enables you to create more complex conditions.

FieldDescription
ComparisonDetermines how the page view count for the current session is compared to the number specified for Match.
MatchThe number of page views to compare.
FieldDescription
Query String nameName of the query string parameter whose value is compared.
ComparisonDetermines how the query string parameter value is compared to the value specified for Match.
MatchThe value the query string parameter is compared to.
Case sensitiveIf selected, the comparison is case-sensitive. If not selected, the comparison isn't case-sensitive.
FieldDescription
Quirk nameName of the quirk whose value is compared.
ComparisonDetermines how the quirk value is compared to the value specified for Match.
MatchThe value the quirk is compared to.
Case sensitiveIf selected, the comparison is case-sensitive. If not selected, the comparison isn't case-sensitive.

Activating personalization involves identifying the content you want to use under different conditions, and then assigning those conditions to the content. This is called the "personalization criteria." It involves comparing one thing to another. There are three basic elements:

  • Left expression determines the value being compared.
  • Operator determines how the comparison is being made.
  • Right expression determines the value the left expression is compared to.

In Uniform, personalization criteria must be described using a specific format. The following is an example of a JSON object that represents this format:

[ { "id": "personalized-content", "fields": { "title": "Personalized Home", "description": "This is personalized content." }, "pz": { "crit": [ { "l": "someSignal", "op": ">", "r": 0 } ] } }, { "id": "default", "fields": { "title": "Default Home", "description": "This is default content." } } ]

In English, this object identifies two variants: a personalized one and a default one. The personalized variant has a condition associated with it that specifies it be used when a signal someSignal has a value > (greater than) 0.

When's this knowledge needed?

Often you won't need to build personalization criteria manually. Uniform Canvas provides a user interface for configuring them. If you aren't using Canvas, you can use one of the Uniform apps for your content system, such as [Contentful]/docs/integrations/content/contentful/uniform-in-contentful#add-marketplace-app) or Contentstack.

However, if you are adding personalization directly to an application without one of the technologies described above, you will need to understand how personalization criteria is defined.

Personalization criteria is configured in a number of different ways:

Front-end layout controllerPersonalization configured usingActivation requiredDescription
Uniform CanvasUniform CanvasNoneWhen Canvas is used to control application layout, personalization is configured by the practitioner and it's activated automatically.
DeveloperIntegrationDeveloperPractitioner configures personalization from their content system, but personalization must be activated by a developer.
DeveloperDeveloperDeveloperDeveloper configures and activates personalization programmatically. This requires the developer configuring personalization criteria in the required format.

Operators are a basic part with how personalization criteria is expressed. The following operators are supported:

Operator (in code)Operator (in UI)DescriptionNotes
==Equal to
!=Not equal to
>>Greater than
>=Greater than or equal to
<<Less than
<=Less than or equal to
has the strongest scoreStrongest intentThis operator only applies to intents.
has the weakest scoreWeakest intentThis operator only applies to intents.