Begin Adding Tracking

Begin Adding Tracking

With the Mixpanel library initialized, you can begin sending data to your project. Refer to your tracking plan for what to track and the developer documentation for the correct syntax to make it happen.  The two main types of methods for sending event and event property information to Mixpanel are:

  1. Track methods - used to send event and event property information.  Client-side events will include the default engagement properties automatically. 
  2. Register methods (client-side SDKs only) - used to create super properties.  These properties will be stored in a device’s cookie/local storage and will be sent as properties on all events tracked from that device.

Where to add these different calls is where things can get more challenging.  At this point, you will need to rely on your knowledge of how your application functions for the best place to insert tracking code.  A few things to keep in mind generally when adding tracking:

  • All Mixpanel methods must come after the Mixpanel library has been loaded.
  • Track calls will usually be tied to event listeners/handlers of the corresponding action being tracked.  

After adding a track call for an event, make sure that information makes it to Mixpanel.  Trigger the event from your application and then in Mixpanel, go to the Live View report under the Data Management tab.  Live View will display events that are sent to your Mixpanel project in real-time and allows you to verify the event and properties are being tracked as expected.

ACTION ITEM: Add tracking for an event based on what is outlined in the tracking plan, perform the corresponding action, and check for the event in Live View.