JavaScript
This page is related to the JavaScript Web Library to use in the browser. This is not the guide for NodeJS usage.
Last updated
Was this helpful?
This page is related to the JavaScript Web Library to use in the browser. This is not the guide for NodeJS usage.
Last updated
Was this helpful?
You can install our @toolbird/web
package on NPM to easily add Toolbird Analytics to your website.
Use your favourite package manager to install the @toolbird/web
package:
After installing the library you shall initialise it and it will begin tracking automatically. You initialise it using toolbird.init(options)
. .
Initialise Toolbird:
Start capturing custom events with properties:
Start identifying users to get better insights
When identifying users, you are no longer privacy-friendly and will need to ask for explicit permission though something like Cookie Banners to keep being compliant with GDPR.
The first parameter is userId, this should be a unique id to reflect this specific user. You can pass as many keys in the second parameter.
There are 3 reserved keys, email
, name
and avatar
. These are used to display basic information on the Dashboard. It is recommended to add these 3 keys. Other than that, you can add whatever you want like mrr
, subscription
or other data you would want to display in the Toolbird Dashboard.