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.

Basic Actions

Minimize Widget

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

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.

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.

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.

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.

By default, form responses do not link any captured email address with the current user. This can be enabled from the Link Email to User option in this action.

Last updated