boardme allows you programmatic access to track your Users.
To use the API you need to have boardme installed into your website or application!
In your application code, you can find boardme on the window object. It is in the global scope.
// To store it you could do:const boardme = window.boardme;// To use it within TypeScript projects could could do:declare const boardme: any;// It is a good idea to play it safe when importing external packages.// A quick check before using the API is good practice!boardme && boardme.apiCall();
You can add boardme to your project by executing the command below in your terminal.
npm install boardme --save
If you are using the boardme API through the installed package, all your calls will be handled gracefully and you don't have to worry about a script import error crashing your application.
In certain edge cases, you might want to set the boardme User programmatically. This might be because the user data gets loaded in after the boardme script, you're running a complex application on a single page, or it just might be your personal preference.
In any case, boardme offers you an API for that.
You can track your user by executing this API method. When executing it, you will need to provide a unique identifier for the user.
userIdentifier - the unique identifier of the user as a string.
const userIdentifier = "my-super-unique-user-identifier";boardme.user( userIdentifier );