With ButtonJS an ideal integration enables you to track the actions of your users across the devices and sessions.
An example of a user journey follows when a user first engages your site anonymously, signs up for an account, and signs in later. Perhaps even on a different device.
ButtonJS provides two methods to let you track those actions, and be able to connect, and disconnect the journey. The first method should be called when your website visitor signs in:
bttnio('setCustomerId', 'alfred-pennyworth-123'); // case-sensitive string
To "unset" the website visitor when they sign out, call the same function, but apply a
Implementing ButtonJS in this way allows for a stable identifier to support cross-device mapping for registered users.
These methods can be called on every page load after the user is signed-in, or just once after a successful sign-in.
If this method is called on page load, it should be the first
bttnio() called to ensure all other reporting events that follow make the proper session associations with each event.
Updated about 1 month ago