blog single image
blog single image
Userflow Updates

Simplified Userflow.js installation

blog author
Sebastian Seilund

March 16, 2020

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

41 sec read

blog single image
Userflow Updates

Simplified Userflow.js installation

blog author
Sebastian Seilund

March 16, 2020

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

41 sec read

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

About the author

Co-Founder of Userflow

Sebastian Seilund is the co-founder and former CEO of Userflow, where he built one of the leading user onboarding platforms for SaaS companies. With experience as a software engineer at Google and having founded multiple successful software companies, including Denmark's first user-friendly accounting software, Sebastian brings deep technical expertise to discussions about product-led growth and user experience.

Effortless Onboarding,
Powerful Results

Try the most-loved user onboarding product on the market.

CASE STUDIES

All case studies
iconicon

Evocalize

a case study

How Evocalize Boosted Product Adoption and Engagement With Userflow 

Learn how
iconicon

Visma Dinero

a case study

How Visma Dinero provides 24/7 onboarding and support with in-app content and AI Assistant.

Learn how
iconicon

Iteratively

a case study

How Iteratively gives users an awesome first-time experience

Learn how
iconicon