Variants & Personalisation

Video Canvas content modules support variants — different paths through the same content, tailored to different viewer circumstances. The content module page in this portal shows all available variants with their descriptions.

Variant codes

Each variant is identified by a positional code (e.g. bbabba). Each character represents a segment of the content module (a video chapter or the recap section):

  • A letter (a, b, c, ...) selects which version of that segment to show
  • 0 removes that segment entirely from the viewer experience

The variant string must be the same length as the number of segments in the content module. For example, with 6 segments:

  • aaaaaa — all default segments
  • bbabba — chapters 1, 2, 4, 5 show variant b; chapter 3 shows variant a; chapter 6 shows variant a
  • bb0bba — same as above but chapter 3 is skipped

Setting the variant

lightbox({
  id: 'YOUR_MODULE_ID',
  variant: 'bbabba',
  targetElement: '#play-button',
})

The available variant codes and their descriptions are listed on the content module page. The embed code includes the currently selected variant.

Personalisation

Modules can include replacement patterns — placeholders like {vA}, {vC} that are substituted with viewer-specific data such as dates, monetary amounts, or names.

Pass personalisation values via the content property:

lightbox({
  id: 'YOUR_MODULE_ID',
  variant: 'bbabba',
  content: {
    vA: '03/15/2026',
    vC: '$3,500.00',
    vD: '$2,800.00',
  },
  targetElement: '#play-button',
})

The content module page shows all replacement patterns for each chapter along with their default values. If a value is not provided in content, the built-in default will be used.