Initialize

This is a required function that initializes the Boomtrain library for user tracking, using the previously-defined API keys. This function can has 2 optional parameters that identify the current user: email & user_properties.

user_properties is a JSON object that can be modified to the include the information you wish to store. It can also be used to update user properties if they change.

Here’s the initialization call for a page that has user data:

_btn.initialize('[email protected]', { 
     "first_name": "alfred", 
     "last_name": "boomtrain"
});

Alternatively, you can make the initialization call with no arguments for anonymous users. Here’s the initialization call for a page that doesn’t have user data:

_btn.initialize();