Splitbee is a lightweight and easy to use web analytics tool. It allows you to collect stats about your website, such as where visitors came from, how long they stayed, how they found the site and their country.
1. Get started
Heard over to splitbee to create your free account. Sign up for a free account, and add your website on the dashboard.
2. Add Splitbee to your website.
Adding Splitbee to your website is easy. Add the following script tag to the
of your website.<script async src="https://cdn.splitbee.io/sb.js"></script>
Ensure your script tag has the async
or defer
attribute.
Navigate to your website, you should now some some stats on your Splitbee dashboard.
Or even better, if you use NPM
or Yarn
, Splitbee has package called @splitbee/web
.
Installation with npm
npm i @splitbee/web
Installation with yarn
yarn add @splitbee/web
Initialize splitbee in your main.js
or entry point of your application.
splitbee.init();
3. Event tracking
Splitbee also supports custom events, you can track user actions within your app, such as sign up button click, product purchase/adding to cart.
It is as easy as
splitbee.track("Sign Up")
If you want to add custom data,
splitbee.track('CART', {
name: 'Added product to cart',
});
splitbee.track('CART', {
name: 'Removed product from cart',
});
Thank you for reading, for more information, see the Splitbee documentation.
Top comments (0)