Segment Definition
To create unique experiences or webpages is to identify and target your audience. Segment definitions are the heart of the D6 Engine. They’re the link between user data and the ability to create authorable segments. Segment definitions are typically set up by Digital On Six (as anonymous definitions) and augmented by your development team or our professional services team. Definitions are easy to configure via a user-friendly, intuitive AEM UI, and are not something typically done by the marketing teams. Segment definitions are made up of five important features:
- Unique ID
- Data access key
- Data type
- Title
- Constrained data values
Unique ID
Each segment definition has a unique ID used by the system to relate segments with segment definitions. The ID provides a link mechanism so that when an author chooses a segment definition, the segment remains valid even if that definition is moved.
Data access key
The key is a way for the system to query the data to resolve a segment. For example, if the data were inside an HTTP cookie, the key would resolve to the cookie name. If the data were within a JSON object, the key could be user.weather.today where the JSON object could be:
{
"weather" : {
"today" : 10
}
}
Data type
When comparing data, it’s important to understand the different data types available. By default, the system assumes all data is a “string”. In programming, string comparison can lead to unexpected results if the data is numerical (e.g. "12" > "2" is false, but 12 > 2 is true). Misunderstanding of the data type can lead to inaccurate results.
Title
The title is what the author sees when it uses your data point. It should be descriptive and user-friendly (e.g. US States is an easy-to-understand title for use as a geographical data point) so the purpose of the data point is clear.
Constrained data values
When we constrain data, we tell the system that only certain values are expected or can be chosen (e.g. a data point of all US states could have a pre-defined list of the 50 US states and the District of Columbia).
Segment Definition Category
When you define a segment definition, you must pre-define which category that definition belongs to from four available data sources:
- Header
- Query
- Cookies
- User
Header
Many browsers provide data to your web server identifying who they are, as a default setting. A commonly used header is “User-Agent” which can identify the difference between mobile and desktop browsers. Using this header, we can provide your audience with a custom mobile vs. desktop browser experience.
Query
The query category analyzes the query string parameters sent by the user, and the key is the name of the parameter to obtain the values.
Cookies
Cookies are small, individual identifier files that web servers send to browsers and are then sent back to the server each time your browser requests a new page as a way to remember you, your preferences, and your online habits.
The cookie category looks at each HTTP request. It checks the cookie using the "key" defined and matches it according to the data. For example, a customer may be able to define a user’s "logged-in state" by checking the existence of a logged-in cookie and create a segment definition of "logged in" based upon the existence of a cookie name JSESSIONID.
User
The user category is an advanced field only available in a complex D6 architecture configuration. The user is a JSON object, unique to each visitor visiting your site, and is pre-filled with three data points:
- Location
- Weather
- Timezone
The user object also contains behavioural data including webpages visited, the number of times visited, and the duration of the visit. The key in this case is a way to obtain data from the user object. The key can further define the object by using a "dot". For example, if the key is "weather.rain", it looks within the user object for the sub-JSON object “weather” and then for the field "rain".
Last Updated: