Send Events from Web
Overview

From your web app, you can collect information to build out a user profile, as well as send custom events to your mixpanel project. This can be done by using mixpanel's SDK.
Setting up the SDK
To start sending data, install the SDK into your project:
npm install mixpanel-browser
Once installed, configure the SDK to start tracking events by initialising:
Identifying Users and Creating User Profiles
Once this is initialized, you can identify and define attributes for users of your platform. This will populate their user profile in mixpanel, allowing you to track and gather insights on their user journeys through the platform:
An example of how you might want to sync user profile data to mixpanel can be found in our mixpanel repository. You can also follow mixpanel's documentation on identifying users.
Sending and Tracking Generic Events
You are also able to track events from your web app. An example is shown below:
You can follow mixpanel's documentation to learn more about how to send web events from your web application.
Last updated
Was this helpful?

