In this guide
- Send events to Mixpanel's track endpoint with the project token, an event name, a distinct ID and properties.
- Use an insert ID to avoid duplicates and the right regional host (US or EU).
- Keep personal data out unless you have a basis, and respect consent.
Mixpanel is a product analytics tool used for event and funnel analysis. Sending events from a server container keeps the browser lighter and lets you send backend events too. This page shows the recipe in outline. Mixpanel's API changes, so check its documentation. See also GA4 in a server container and server-to-server tracking.
What you need
- A Mixpanel project token.
- Your project's data residency: standard (US) or EU, which use different hosts.
- A stable distinct ID for the person.
Watch events arrive, live
A sample feed. In Open Tracked you see the same stream for your own store.
The request
const sendHttpRequest = require("sendHttpRequest");
const JSON = require("JSON");
const getEventData = require("getEventData");
const host = data.region === "eu" ? "api-eu.mixpanel.com" : "api.mixpanel.com";
const events = [{
event: data.eventName,
properties: {
token: data.token,
distinct_id: data.distinctId,
time: data.timeSeconds,
"$insert_id": data.insertId,
value: data.value,
currency: data.currency
}
}];
sendHttpRequest("https://" + host + "/track", (statusCode) => {
statusCode === 200 ? data.gtmOnSuccess() : data.gtmOnFailure();
}, {
method: "POST",
headers: { "Content-Type": "application/json", "Accept": "text/plain" },
timeout: 3000
}, JSON.stringify(events));Check Mixpanel's documentation for the current endpoint, authentication and property names.
Design the events
| Choice | Advice |
|---|---|
| Event names | Use a naming scheme. Reuse your GA4 names for consistency |
| Distinct ID | A stable ID: a user ID for logged-in people, a client ID for anonymous visitors, and merge when they log in |
| Insert ID | The order ID or event ID, so retries do not duplicate |
| Properties | Value, currency, items, source. No e-mail or names unless required and consented |
| Time | Unix seconds, within the accepted window |
Brands that grow on cleaner data
Stores and agencies use Open Tracked to see which ads earn the sale.
Consent and privacy
Mixpanel profiles can hold personal data. Decide what you send, whether it needs consent, and whether to use the EU residency option. See GDPR and server-side tracking.
Test
- Send a test event in server Preview.
- Check the tag status and response.
- Check Mixpanel's live view for the event and its properties.
- Send the same insert ID twice and confirm it counts once.
A realistic example
A software company sends product events to Mixpanel from the browser and finds that about a fifth of sign-ups are missing, because blockers stop the browser requests. It routes the key events through its tagging server, with the user ID as the distinct ID for logged-in users and the client ID for anonymous visitors, and with the order or event ID as the insert ID. Mixpanel's sign-up count rises to match the company's database, and funnels that start with anonymous visitors and end with sign-ups finally join up when the visitor logs in. The company chooses the EU residency option and avoids sending e-mail addresses. Changing the route changed what the team could believe about its funnels.
Keep it healthy
Compare event counts in Mixpanel with your database or analytics once a week for the main events. Differences point to blocked, failed or duplicated sends. Keep your event names and properties in a short document so that the server tag and the browser code do not drift apart.
Connected in minutes
Add your domain, install the pixel, connect your ad platforms and watch the first events land.
Frequently asked questions
Can a server container send events to Mixpanel?
Yes, by calling Mixpanel's track endpoint from a tag with the project token and event data.
What is a distinct ID?
The identifier Mixpanel uses to recognise a person across events.
How do I avoid duplicate events?
Send an insert ID, such as the order or event ID.
Which host should I use?
The one that matches your project's data residency, US or EU.
Do I need consent?
Where the law requires it for the data you send.
Do I need spreadsheets to read my results?
No. Once tracking is live, the Open Tracked analytics shows spend, revenue, ROAS and profit, and you can ask Ari, the built-in AI assistant, questions about your own numbers in plain words. Ari's allowance depends on your analytics plan.
Is Open Tracked different from Open Track or Open Space Track?
No. Open Tracked is the official name of our server-side tracking platform, and the website is opentracked.io. Many people search for it as Open Track, OpenTrack or Open Space Track. All of them lead to the same product: server-side Google Tag Manager hosting, first-party analytics and a CRM pipeline.

Fix your tracking at the source
Open Tracked hosts your server-side Tag Manager, keeps first-party cookies alive and shows what each ad is really worth.
The Open Tracked team
We build Open Tracked: server-side tracking hosting, analytics and the tools around them, for stores that spend on ads. Questions about this guide, or an idea for the next one?
Comments
Loading comments...











