Sample code
// you can get the personalization ID from the dashboard
Txt.launchComponent('abcd1234')

Use the launch add-on function to programmatically launch a component regardless of audience by providing the experienceId.

The component will only be shown if:

  • The target page settings match the current URL of the visitor
  • The state of the experience is 'live'
  • The visitor is not in the control group
  • The components 'Keep hidden after closing for' setting matches

If you want to make sure the component always shows, simply target all pages, set the value of 'Keep hidden after closing for' to 'never' and set the testing mode to 'no control group'.

If you want to trigger the component only by API and you never want to trigger it automatically by audiences, then simply set the target audience of the component to 'nobody'.

Txt.launchComponent(experienceId)

The launch component function takes the following arguments:

Argument

Type

Description

experienceId

string
required

The experience ID of the component to launch.