Skip to main content

Uniform 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 are classified.

Manifest

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

Format

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:

Configuration

Enrichments are usually associated with content, therefore they are usually configured along with content. Uniform provides native 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.

Signals

Criteria types

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 is not case-sensitive.

Current Page

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 is not case-sensitive.

Event

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 is not case-sensitive.

Group

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.

Page View Count

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.

Query String

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 is not case-sensitive.

Quirks

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 is not case-sensitive.

Personalization

Format

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 is this knowledge needed?

In most cases you will not need to build personalization criteria manually. Uniform Canvas provides a user interface for configuring them. If you are not using Canvas, you can use one of the Uniform apps for your content system, such as Contentful 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.

Configuration

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 is activated automatically.
DeveloperNative integrationDeveloperPractitioner 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

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.

Architecture

Development architecture

Context with Uniform Canvas