Create your first analytics.js bundle

analytics.js is the easiest way to do analytics with different providers.

With Bytics, you can create your own version with the config embedded.

Configure your integrations

  1. Go to the bytics app page
  2. Click on one integration on the left side
  3. Enable the integration and fill the fields needed

Configure others integrations if needed.

Generate the snippet and the analytics.js file

  1. Click on Get Analytics.js on the top of the page
  2. Right click on the button Download analytics.js and save the analytics.js file
  3. Copy the snippet provided

Install the snippet

  1. In your HTML, paste the snippet and replace URL_OF_ANALYTICS by the url of the analytics.js file
  2. You can now track page views, actions and attach user info using analytics.js

    To track actions:

     analytics.track('Event name');
    

    To identify users:

     analytics.identify('user_id', {
       name: 'user_name',
       email: 'user_email'
     });
    
  3. And it's done!

Further reading