API Reference

List of all methods exposed by flowdash.js

  • flowdash.init(<APP_ID>, <API_KEY>)

It initializes the SDK with the campaigns that are live for your audience. This method needs to be called once per page load or once in a React app.

Example usage:

 flowdash.init('<YOUR_FLOWDASH_APP_ID>','<FLOWDASH_API_KEY>');
  • flowdash.identify(<userId>, {< optional user attributes>})

Identify a user with this method in all the appropriate places in your app. A good place is post-login. All the attributes sent along in this method will be merged together to form a user profile which can be used for personalization. Example usage:

flowdash.identify(user.id, {
  email: user.email,
  name: user.name,
  createdAt: 1616422989647 
  // createdAt is the special attribute used to denote sign up event. 
})
  • flowdash.reset()

Call reset when the user signs out of the application. This clears the context of the user that Flowdash has. Example usage:

flowdash.reset();

Last updated

Was this helpful?