How to redirect users or close a box with dynamic branching

When setting up a box with dynamic branching to create different flows, you may want some branches to end with the user being redirected to a specific URL or with the box closing entirely. It’s possible to do that using our Form Auto Submit and Clear Data Layer app

To start, download the app by going to Custom JavaScript (Apps) under the account dropdown in the upper right, and search for and install the Form Auto Submit and Clear Data Layer app under the available apps. 

Once the app is installed, follow these steps in the box itself:

  1. Add a new Extra Page
  2. On the extra page set the background to transparent:

    Set the Border to none, and make sure there are no elements enabled on the page.
  3. Enable the form on the page and turn off all fields.
  4. Set the After Form submit to ‘Redirect to URL’ (or ‘Close Box’ if needed).
  5. Configure the page to automatically submit its form by adding Page Metadata form_autosubmit : true

 

Now you can set your dynamic branching to send users to this page to redirect them to the desired URL or close the box!

 

Note: As users navigate through this flow, they will very briefly be “shown” the invisible page before the form is submitted and runs its configured action. For best results, do not use the core Close Button Display under the widget settings:

Otherwise, users will momentarily see a floating close button. Instead, you’ll want to add a Close Button element on each page.

 

Any questions? Feel free to email support@digioh.com!