Tell me more about the $experiment_started event. Can i call this on the backend or do i have to use the client sdk?
Hi Ashton C., Please stand by as I search the Mixpanel knowledge base for an AI-powered answer. I normally take about 15 seconds or so. In case AI cannot answer your question, feel free to reach out to Mixpanel support at mixpanel.com/get-support. If you have follow-up questions for this thread, please tag me again with your question: @kapa.ai <follow-up question> đź‘‹
Feel free to ask a follow-up question once I've answered by mentioning me with @kapa.ai
The $experiment_started
event is a special event used in Mixpanel to track experiment exposures. Here are the key details about this event:1. Purpose: It's used to tell Mixpanel which user was exposed to which variant of an experiment at a specific time.2. Required Properties: The event must include two specific properties:
- "Experiment name": The name of the experiment the user was exposed to
- "Variant name": The name of the variant the user was bucketed into3. Backend vs Client SDK: You can send this event from both the backend and the client-side. However, the recommended approach depends on your specific setup: - Backend: You can manually send this event server-side using Mixpanel's HTTP API or server-side SDKs. This is often preferred for accuracy and reliability.
- Client SDK: You can also use client-side SDKs to send this event, typically as part of a wrapper function around your feature flag checks.4. Event Format: Here's an example of what the event payload should look like:
"event": "$experiment_started",
"properties": {
"distinct_id": "alice@​[example.com](http://example.com)",
"time": 1709275888,
"Experiment name": "my_experiment",
"Variant name": "control"
}
}
```LBKSLBKS5. Importance: This event is crucial for populating Mixpanel's Experiments report and allowing you to analyze the impact of your A/B tests.LBKSFor more detailed information, you can refer to the [LaunchDarkly Integration documentation](https://docs.mixpanel.com/docs/tracking-methods/integrations/launchdarkly) and the [Experiments Report documentation](https://docs.mixpanel.com/docs/reports/apps/experiments#advanced).
kapa.ai is still learning and improving, please let me know how I did by reacting below.
ℹ️ Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help.