cx-composer--for=liferay

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

  1. 01Author a JS module that exports a default function returning {attribute: value}.
  2. 02Declare parallel arrays for the attribute names, symbols, and types.
  3. 03Point url: at the assembled JS.

# optional fields

fieldtypedescription
namestringDisplay name.
namesstring[]Human-readable attribute names (parallel array with symbols/types).
symbolsstring[]Camel-case symbols exposed to segment rules.
typesstring[]Value types (string, boolean, number).
urlstringPath 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