Identify Your User

Once your OnboardFlow JavaScript Tracker has been installed, it's really important that you properly identify the logged-in user.

Minimum Requirements

OnboardFlow will ONLY log user activity if we know who that user is. As such, you must make sure that you include at-least the user ID and customerID. 

Before you identify your user, a typical JavaScript snippet will look like the following:

In the user > id field, insert the unique ID of the user that is logged into your platform. If they are not logged in, this should be empty. Similarly, with the user > customer_id field, this should be set to the unique ID of the subscription customer record associated with the logged-in user (i.e. the Stripe, Chargebee, Razorpay, Braintree customer ID).

If you have not connected your Payment Provider (Stripe, Chargebee etc) because you entirely handle trials and SaaS subscriptions internally (or you send your trial and subscription data to OnboardFlow via our API), then you can just set the customer ID to be the same value as the user ID.

Additional User Fields

In addition to the user ID and customer ID fields, it can also be really helpful to set their email address and profile photo. Later on, when your trials are tracked and made available within your OnboardFlow dashboards, it will help if you can see visually who the user is. The email address also makes it possible for you to send targeted emails to them based on intelligent triggers.

Other than id and customer_id, inside the "user" part in onboardFlowSettings, you can set the following fields:

  • email
  • image_url
  • first_name
  • last_name

So for example, if you want to set the first_name you would need to add first_name as a key to the user dictionary when identifying the user, as follows:

	window.onboardFlowSettings = {
		"user": {
			"id": USER_ID_HERE,
			"customer_id": CUSTOMER_ID_HERE,
			"first_name": FIRST_NAME_HERE,

Custom Properties

The Custom Properties section is an area for you to log and track key stats or pieces of information about the logged-in user. These values should either be numbers, booleans (true / false) or strings. So for example, you might want to track how many projects the user has created, or how many team members they have invited. We generally recommend tracking between 3 and 5 data points that you believe are unique and / or key to the operating of your product. OnboardFlow will, later on, report on insights related to these properties - such as the average number of projects that a trial creates.

So for example, these could be set as follows:

	window.onboardFlowSettings = {
		"custom_properties": {
			"company_name": COMPANY_NAME_HERE,
			"total_tasks_created": TOTAL_TASKS_HERE,
			"total_projects_created": TOTAL_PROJECTS_HERE,

A note about how these custom properties are handled. Any Number or Boolean based custom property will automatically be tracked over time and reported on via your OnboardFlow dashboard (i.e. so that you can track what the avg number of tasks a trial creates is overtime). All String based custom properties (such as company name or some other string based attribute) will not be tracked over time from an analytical standpoint and will instead be visible against the individual trial users within the CRM.

ALL custom properties (irrespective of the data type) can be accessed when defining custom cohorts or auto messages as a way to filter the audience.

Updating user details manually

Whenever a page is loaded on your site, OnboardFlow will automatically identify your logged-in user based on the details you pass to it (see above). However, if you run a single page app you may be updating the user's details or custom properties and not refreshing the page. In the cases, you can run the following code to update the identity manually.


For more info on Single Page App support, click here.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.