Skip to content

Using Actions ​

Actions are added to Button and Email Collection components that get invoked when the user clicks a button or successfully submits an email address.

Like other properties, actions are configured from the Property Panel.

Loading embed...

Adding the 'Close Widget' action to a button.

Basic Actions ​

Minimize Widget ​

Switches the widget to the minimized view, hiding all other views in the process.

INFO

The minimized view is configured from the general Widget Settings.

Maximize Widget ​

Returns to the previous view from which the widget was minimized.

Close Widget ​

Completely removes the widget and all its views from the page.

Options

  • Hide for Rest of Session - Prevents the widget from being shown again to the user for the remainder of their current browsing session. This can be useful to prevent the widget from being shown multiple times when a user might qualify for a segment multiple times during their visit.

Switch to View ​

Replaces the current view with another.

Switch to Previous View ​

Returns the widget to display the previous view that was visible.

Show View ​

Shows a specific view, while keeping the current view visible.

Hide View ​

Hides a specific view, without affecting any other views.

Page Actions ​

Navigates the browser to a specific URL.

Refresh Page ​

Refreshes the browser, optionally appending parameters to the URL.

Options

  • Additional Parameters - A list of optional parameters to append to the URL. E.g. This could be used to add a utm_source parameter to the URL to track engagement from a widget in your analytics provider.

Invoke JavaScript Function ​

Executes a JavaScript function. The function must be globally available on the page.

Options

  • Function Name / Path - The path to the function to invoke from the window. Dot notation may be used to access a function nested within an object. E.g. window.api.doSomething().
  • Function Arguments - Any arguments you need to invoke the function with must be provided as a JSON array. Strings must use double quotes. E.g. ["something", 50, false, {{ offer.code }}].
  • Close Widget After Execution - Closes the widget after executing the JavaScript function.

Offer Actions ​

Collect Offer ​

Collects the current offer, also adding it to the user's wallet. Optionally allows switching to a specific view after collecting the offer.

INFO

Version 4 Campaigns do not support this feature as all offers are automatically collected once presented.

Apply Offer to Cart ​

Applies the current offer (determined via segmentation) to the shopping cart.

INFO

Apply to Cart must be implemented in the integration for this function to work.

Apply Specific Offer to Cart ​

Applies the a specific offer code to the shopping cart.

INFO

Apply to Cart must be implemented in the integration for this function to work.

Special Actions ​

Submit Form Data ​

Collects all values from Form Control components in the current view and submits them if valid. After submission, this action switches the widget to a specific view.

Options

  • Subscribe email to ESP - If enabled links any submitted email to the user and triggers an Email Collected streaming event which can be used to subscribe them to an ESP. Note that this requires a form component of type "Text" with validation set to "Email".
  • Subscribe phone number to SMS - If enabled links any submitted phone number to the user and subscribes them to SMS messaging. This requires a form component of type "Text" with validation set to "Phone".
  • Form Data - Append static key-value pairs (e.g. animal: kangaroo, color: blue) to the submission, even if those fields aren't present in the user-facing form. Useful for directly submitting answers to quizzes or adding extra data on submission.

INFO

If a Form Control has a Default Value set, that value takes priority over any matching key in Form Data. See Submit Form Data for full details on default values, merging across views, and validation behavior.

For an in-depth explanation of how submissions are assembled, see Submit Form Data.