Start collecting data

The simplest way to start collecting data is by adding UserFlux to your website. It only takes a few minutes and will start auto capturing traffic along with location and device information about the user.

To get started, either copy the code snippet below or install the SDK:

<head>
    <!-- Your other head tag code -->
    
    <script type="module" async>
    import UserFlux from 'https://cdn.skypack.dev/@userflux/browser-js-lite'
    UserFlux.initialize('<YOUR_WRITE_KEY>', {
	autoCapture: ['all'],
	allowCookies: true,
	autoEnrich: true,
	trackSession: true,
	defaultTrackingProperties: { project: 'Landing Page' }
    })
    </script>
</head>

Make sure to add the script to the end of your head tag and replace <YOUR_WRITE_KEY> with your own API key


This is all you need to do to start seeing some data come through into your workspace. When you're ready to add more data, you can checkout the Integration section to learn how to identify users and send custom events.

Integration

Last updated