Using Actions
Last updated
Last updated
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.
Switches the widget to the minimized view, hiding all other views in the process.
The minimized view is configured from the general Widget Settings.
Returns to the previous view from which the widget was minimized.
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.
Replaces the current view with another.
Returns the widget to display the previous view that was visible.
Shows a specific view, while keeping the current view visible.
Hides a specific view, without affecting any other views.
Navigates the browser to a specific URL.
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.
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.
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.
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.
Applies the a specific offer code to the shopping cart.
Apply to Cart must be implemented in the integration for this function to work.
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.