Skip to main content

Data Ingestion Overview

Mixpanel offers multiple methods to ingest data into your project. Choose the approach that best fits your technical requirements and use cases. client-side vs server-side

Available Ingestion Methods

SDKs

Native libraries for web, mobile, and server environments

Integrations

Connect third-party tools and CDPs like Segment and Google Tag Manager

HTTP API

Direct API access for custom implementations

Warehouse Connectors

Import data from Snowflake, BigQuery, and other warehouses

Choosing the Right Method

If you use our SDKs, there are two general approaches to track events: client-side and server-side. The approach you choose has implications on the quality and comprehensiveness of your data. We recommend tracking everything you possibly can via your servers, and only supplementing that with client-side tracking when necessary.

Server-Side Tracking

In this method, you send events from your servers to Mixpanel. For example, when a user loads a web page, a request is made to your web application server. In the code that handles the request, you can create a “Page Loaded” event and send it to Mixpanel. Pros
  • Reliable, not susceptible to ad-blockers
  • Data is consistent across platforms
  • Easier to fix integration mistakes quickly
Cons
  • Harder to track user interactions that only happen on the client
  • Requires some custom code to track anonymous (non-logged in) users across requests
Server-Side SDKs

Client-Side Tracking

In this method, events are generated on the client device and sent to the Mixpanel API. There are two types of client-side tracking: web (Javascript) and mobile. Pros
  • Easy to track client-side actions and state
  • Easy to track anonymous (non-logged in) user data
Cons
  • Unreliable, due to ad-blockers. You may lose events for 30-50% of your users
  • Difficult to keep metrics consistent across web, iOS, and Android
  • Difficult to fix integration mistakes quickly (particularly on mobile)
  • Tracking will diverge over time due to old mobile clients
Client-Side SDKs
Mixpanel client-side SDK uses the /track API endpoint which by default only ingests events in the last 5 days.

Client-Side Tracking via a Proxy

A proxy is helpful in a client-side web setting to reduce the likelihood of ad-blockers impacting your tracking. See the JavaScript SDK documentation for setup instructions.

Integration with CDPs and Tag Managers

If you already track events via a CDP, Tag Manager, or via your data warehouse using tools like Snowplow, you can route those events to Mixpanel with our native integrations: We can also load data directly from data warehouses like Snowflake and BigQuery.

Next Steps

Explore SDKs

Browse our native libraries for all major platforms

Best Practices

Learn how to implement scalable, maintainable tracking

Build docs developers (and LLMs) love