Audiences Custom Attributes
Contribute custom user attributes to Liferay Audiences segmentation.
type: audiencesCustomAttributes·Audiences# description
Registers custom attributes (time-of-day, touch-device, geo-region, in-house data) that Liferay Audiences can use in segment rules.
Contribute custom attributes to Liferay Audiences segmentation.
# when to use
- →You need Audiences segments based on data Liferay does not track natively.
- →You have first-party signals (device, session context, in-house scores) that should drive segmentation.
# how to use
- 01Author a JS module that exports a default function returning
{attribute: value}. - 02Declare parallel arrays for the attribute
names,symbols, andtypes. - 03Point
url:at the assembled JS.
# optional fields
| field | type | description |
|---|---|---|
name | string | Display name. |
names | string[] | Human-readable attribute names (parallel array with symbols/types). |
symbols | string[] | Camel-case symbols exposed to segment rules. |
types | string[] | Value types (string, boolean, number). |
url | string | Path to the JS module that registers the providers. |
# example
client-extension.yaml
visitor-attributes:
type: audiencesCustomAttributes
name: Visitor Attributes
url: custom-attributes.js
names:
- Time of Day
- Touch Device
symbols:
- timeOfDay
- touchDevice
types:
- string
- boolean