Multi-environment support

You can now run multiple environments - such as Production and Staging - under the same Userflow account. This makes it possible to test flows in your Staging environment before publishing them to Production.

Setting up environments

All Userflow accounts start out with a single environment, named “Production”. Under Settings -> Environments, you can add additional environments, such as “Staging”.

Once you add an extra environment, you’ll see a new Environment menu in the top right, which you can use to switch between your environments:

Environment switcher

Each environment has its own Userflow.js Token (the one you supply to userflow.init()) and its own API keys.

Isolated user data

User data, including events and flow sessions, are completely isolated between environments. This means that your Staging users will not interfere with your Production analytics.

When you look at e.g. the Users tab, it’ll only show users in the currently selected environment.

Publish flows to individual environments

Flows, on the other hand, are shared between environments. If you have multiple environments, you can publish a flow to specific environments only. When you click Publish in the Flow Builder, you’ll now see this:

Publish dialog

Simply check the checkbox next to each environment you want to publish to. Unchecked environments will stay on their current version.

Example use case:<br/>Test in staging before publishing to production

  1. Create a new flow.
  2. Add some content to it.
  3. Click Publish in the Flow Builder to open the publish flow dialog. Check only your Staging environment. Click Publish in the dialog footer.
  4. Go to your staging environment (in your own app) and try out the flow.
  5. Optionally, repeat steps 2-4 as necessary.
  6. Once you’re happy with your flow, click Publish in the Flow Builder again. Now also check Production. Click Publish in the dialog footer.
  7. Your real production users can now see the flow.

Activity feed

The user profile page in Userflow has gotten a facelift.

The top contains the user’s high-level details. Email and ID are now easy to copy by hovering over them and clicking the copy icon.

The right side contains a list of all the user’s attributes. They can also be copied by clicking.

The middle now has 2 tabs. The default tab, Activity feed, shows a live view of all the events tracked for the user. Page Viewed events are automatically tracked by Userflow.js. Your app can track its own events through userflow.track(eventName). Click an event to expand its attributes.

The other tab, Flow sessions, shows a list of all the flows the user has seen.

user profile

Simplified Userflow.js installation

Technical post: This post is intended for our developer users.

The recommended way of installing Userflow.js, via the userflow.js npm package, is now much easier than before.

Before, you had to call loadUserflow() first, and then wait to get the userflow object back from the returned Promise. Besides not being perfectly ergonomic, this is problematic if different parts of your app needs to access it.

Now, the module exports a userflow object as its default export, which you can use synchronously. It’ll automatically inject the real Userflow.js (from our CDN) into the current page, and queue all method calls.

Before:

import {loadUserflow} from 'userflow.js'

loadUserflow().then(userflow => {
  userflow.init('...')
  userflow.identify('...')
})

Now:

import userflow from 'userflow.js'

userflow.init('...')
userflow.identify('...')

Note that the real Userflow.js won’t be loaded until you call one of the userflow object’s methods. This way you still have complete control over when Userflow.js actually loads.

See full docs on npm

Customize button size and shape

A few new button-related options were added to Themes:

  • Button height: To make your buttons taller (or shorter) than default.
  • Button min. width: Especially in modals, making your buttons wider and more prominent can look great.
  • Button border radius: Userflow ships with a default border radius of 6 px. You can make the borders completely round or straight by adjusting this.
  • Button horizontal alignment: By default, buttons are right-aligned (except for modals, where they’re centered). You can change this to always be left, centered or right aligned.

Find all the new options under the “Buttons” section on the edit theme page (Settings -> Theme).

Some pretty examples of customized buttons from the Userflow customer PurelyHR:

PurelyHR example 1

PurelyHR example 2

Automatically start flows based on browser content

Userflow can now automatically start flows based on content in the user’s browser. This is highly useful, for example, if you want a flow to appear when a specific button appears in your app.

Until now, you could only auto-start flows based on user attributes, events or the URL of the current page. Now you can use all of the browser-side conditions, such as “Element is/is not present”, “Input value is…” and “User fills in input”.

Simply go to Flow settings in the Flow Builder, click Add start condition, and then pick any of the new condition types in the drop down menu.

Auto-start when element is present

Minimize speech bubble

Speech bubble steps consist of a speech bubble anchored to the corner of the browser window. They may sometimes be in the way of the content users are expected to interact with. Usually, when this is the case, I’d recommend using a Tooltip step instead, which places the tooltip outside of the interaction content.

If you must use a speech bubble step, your users can now minimize the speech bubble by clicking the avatar. Clicking it a second time will restore the bubble again. If a trigger causes Userflow to go to the next step, the speech bubble will automatically be restored, too.

But note that if a flow is running it will block other flows from starting, so this minimize feature should not be used to keep a flow running continously.

Minimize speech bubble

Announcing Webhooks

With webhooks, external systems (such as your own back-end or other data providers) can subscribe to Userflow events, and be notified when they happen.

You could, for example, setup your own integration, which gets notified when a user’s attributes changes in Userflow, and then synchronizes those changes to your CRM.

Very soon, we’ll be offering Integromat and Zapier apps, which will make integrating Userflow to 100s of other services a breeze. These apps will allow for both watching Userflow users and events, as well as sending data into Userflow.

Webhook subscriptions are currently created via the Userflow REST API. A subscription is configured with a URL, which Userflow should POST to when there are new events, and a list of topics to subscribe to.

Read the Webhook subscriptions reference

The Userflow REST API is now live

I’m excited to announce the availability of our new public REST API. With the REST API, you can integrate your back-end with Userflow and pass attributes or events to Userflow. This is useful for 3 reasons:

  • Some attributes/events are only available on the back-end. E.g. if a back-end job updates a user’s status, which Userflow.js on the front-end will never know about.
  • Some attributes/events are sensitive and you may not want to expose the info on the front-end.
  • To import historic attributes/events.

The API is based on REST, and should look very familiar if you’ve ever worked with APIs such as e.g. Stripe.

With the API, you can:

  • Create/update users and their attributes
  • Get/list users
  • Track events
  • We’ll add more resources as needed

To access the API, you’ll need an API key, which you can obtain by signing into Userflow and navigating to Settings -> API.

Read the API reference

Custom events

You can now track any kind of user-related event with Userflow, and use those events to segment and personalize your flows.

Events are easily tracked directly from your webapp using Userflow.js’ new userflow.track method. Example:

userflow.track('subscription_plan_changed', {
  new_plan: 'plus',
  new_price: 279
})

The event will be associated with the currently identified user. You can optionally add attributes about the event (such as the new plan name in the example above).

Events are great to represent actions that users can take any number of times, which don’t fit well into regular user attributes. Some more examples of events:

  • Bill Uploaded
  • Project Created
  • Coworker Invited
  • Payment Details Changed

We’ve added a new Event condition type, which shows up under the Add condition menu, e.g. for conditions to mark checklist tasks as completed, or automatically starting flows.

Here we mark a checklist task as completed if the user has ever created a project:

Completion condition

Here we automatically start a flow for users who have not created any projects within the last 30 days:

Start condition

We’ll be adding a several further improvements to events soon:

  • Ability to filter on event attributes in the conditions
  • Group-related events (for events belonging to e.g. a company in your system)
  • More analytics about events inside Userflow

Backdrop color and opacity

When you build flows with Modal steps or use the Backdrop feature of tooltip steps, Userflow will add a semi-transparent layer on top of your app to give extra focus to the Userflow element.

By default this layer is 40% opaque black. This works well on light UIs (since it makes your own app’s UI look grayed out). It does not work well on top of very dark UIs (it just makes things slightly more dark).

Here’s an example of a dar-mode app with the default backdrop (#000 at 40% opacity). See how the focused element barely stands out:

Default backdrop

You can now change both the backdrop color and opacity under Settings -> Themes. Scroll down to the Backdrop section. Choose Modal in the Preview drop-down field to see a preview of it. Opacity is a percentage number between 0% (completely transparent) and 100% (completely opaque).

For apps with dark UI, we suggest using either a light backdrop color with low opacity (e.g. 25-50%), or a dark color with high opacity (>50%).

Here is the same app from above with a black backdrop color at 65% opacity. The contrast between the background content and the focused element is a lot better!

Black high opacity backdrop

Here it is with #aaa (light gray) at 40%:

Gray backdrop