Experiment metrics and Funnel metrics can differ because they’re calculated in different ways and often over different populations.Key reasons from the docs: 1. Population / attribution differences
- Experiments only consider users after they fire the exposure event ($experiment_started) and attribute all later events to the variant they saw. [Analysis engine]
- Funnels simply look at whoever did the funnel steps in the date range, regardless of experiment exposure.2. Metric definition & normalization
- In Experiments, “group rate” is always normalized by exposed users, not by converters or raw event counts. [Read lift]
- Funnels can be configured as uniques, total conversions, sessions, etc., and “totals” in Funnels are total conversions, not total events. [Funnels FAQ]3. Statistical model & variance
- Experiments use specific statistical models (Poisson/Bernoulli/normal) and compute p‑values, confidence intervals, and lift based on those assumptions. [Interpret results; Read lift]
- Funnels don’t apply this experiment-specific normalization and variance modeling; they just compute the funnel metric directly.4. Counting logic & re-entry
- Funnels have their own rules for re-entry, conversion windows, optimized re-entry, and how multiple attempts are counted. [Optimized re-entry; Funnels FAQ]
- Experiments look at all behavior after exposure (up to 90 days) and attribute it to the variant, independent of funnel re-entry rules. [Analysis engine]5. Query / filter differences
- As with other report discrepancies, even small differences in filters, properties (event vs user), time ranges, or aggregations (uniques vs totals) will cause mismatches. [Data discrepancies]If you want them closer, align: - Same user set (e.g., filter Funnels to users who fired $experiment_started for that experiment/variant).
- Same metric definition (conversion vs total events, uniques vs totals).
- Same time range and filters.
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.
Hi Elena M., 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
Yes, you can do this with a Custom Property using regex_extract on the URL property.1. Go to Lexicon → Custom Properties → New Custom Property.
2. Use a formula like: text regex_extract(properties["page_url"], "[?&]utm_source=([^&#]+)", 1)LBKSThis: - Looks in properties["page_url"] (replace with your URL property name).
- Finds utm_source=... in the query string.
- Returns just the value (capture group 1).[Custom property functions]You can adapt the regex for any parameter, e.g. my_param: text regex_extract(properties["page_url"], "[?&]my_param=([^&#]+)", 1)LBKS
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.
Let me check the knowledge base for you again. One moment! 📚
You’re right that JQL is in maintenance mode and Mixpanel recommends using other methods instead.[JQL app][Custom JQL]For extracting a parameter from a URL going forward, the recommended approaches are: 1. Do it at tracking time (preferred)
Parse the URL in your application and send the parameter as an event property. For example, on web, Mixpanel’s JS SDK already auto-captures UTM parameters and click IDs from the page URL and attaches them to events, so you don’t need a separate export-time function for those.[JS UTM tracking]
On server-side, you can similarly parse query parameters from the request URL and add them to properties before calling track().[Server-side attribution]2. Export raw events and parse URLs outside Mixpanel
If you already have events with a URL property and now want to extract a parameter, export the raw events and do the parsing in your own code or warehouse:
- Use the Raw Event Export API to pull events (optionally filtered by event name or where clause).[Export API; Export methods]
- Example export request:[Project migration export]
--url '[https://data.mixpanel.com/api/2.0/export?from_date=2024-07-23&to_date=2024-07-24&event=sample_event](https://data.mixpanel.com/api/2.0/export?from_date=2024-07-23&to_date=2024-07-24&event=sample_event)' \
--header 'accept: text/plain' \
--header 'authorization: Basic YOUR_TOKEN'
```LBKS - The response is JSONL (one event per line); you can then parse the URL field and extract query parameters in Python, SQL, etc.LBKSThere isn’t a newer Mixpanel-side “event function” API (other than JQL) documented in the sources for doing arbitrary string parsing at query time, so the supported pattern is: extract at ingestion, or export and transform externally.
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.
Let me check the knowledge base for you again. One moment! 📚
You can do this with a JQL map transformation by parsing the URL string and returning the parameter you care about.Here’s a simple JQL example that extracts a utm_source parameter from an event property called current_url: js function main() { return Events({ from_date: params.start_date, to_date: params.end_date }) .map(function(event) { var url = event.properties.current_url || ""; var match = url.match(/[?&]utm_source=([^&#]+)/); return { event: event.name, distinct_id: event.distinct_id, utm_source: match ? decodeURIComponent(match[1]) : null }; }); }LBKSYou’d pass start_date and end_date via params when calling the JQL API, as shown in the JQL parameters example.[JQL params]
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.
Please stand by Matthew M. as I search the knowledge base. I normally take about 15 seconds or so. 👋
Feel free to ask a follow-up question once I've answered by mentioning me with @kapa.ai
