I have an event. Lets call it ideas submission. I have a property for this event called campaign titles. I want to find the average number of idea submissions per campaign. How can I do it?
Hi Ege T., 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
To find the average number of idea submissions per campaign in Mixpanel, you have a few options:
Using Insights Report
You can use Mixpanel's Insights report to analyze your "ideas submission" event and calculate the average per campaign: 1. Go to the Insights report 2. Select your "ideas submission" event 3. Choose "Total" as your measurement type (to count all submissions) 4. Add a breakdown by the "campaign titles" property 5. This will show you the total submissions per campaignTo get the average, you can use Mixpanel's aggregation features: - If you want to see the average number of submissions per user for each campaign, you can use the "Average per user" measurement type with a breakdown by "campaign titles" - Alternatively, you can use formulas to calculate custom metrics
Using JQL (JavaScript Query Language)
For more advanced analysis, you can use JQL with built-in reducers like avg()
: LBKSfunction main() { return Events({ from_date: "2023-01-01", to_date: "2023-12-31", event_selectors: [{event: "ideas submission"}] }) .groupBy(["properties.campaign titles"], mixpanel.reducer.count()) .reduce(mixpanel.reducer.avg()); }LBKS
This query will group all "ideas submission" events by the "campaign titles" property, count them, and then calculate the average across all campaigns. You can adjust the date range as needed.Mixpanel JQL Documentation provides more details on using reducers like avg()
for this type of analysis.
Using Custom Properties
If you need to perform this analysis regularly, you might want to create a custom property that calculates this metric automatically: 1. Create a custom property that references your "campaign titles" property 2. Use aggregation functions to calculate the average 3. Save this custom property for reuse in other reportsCustom Properties Documentation can help you set this up for ongoing analysis.
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.
I am trying to get the total average of all ideas submitted in all campaigns.
Let me check the knowledge base for you again. One moment! 📚
To calculate the total average of all ideas submitted across all campaigns in Mixpanel, you can use the following approaches:
Using Insights Report
The simplest way to get this metric is through the Insights report: 1. Select your "ideas submission" event 2. Choose "Average per user" as your measurement type - This will show you the average number of idea submissions per user across all campaigns - Alternatively, use "Total" to see the overall count of submissionsIf you specifically need the average number of submissions per campaign (not per user), you can: 1. First get the total count of idea submissions 2. Then use a formula to divide by the total number of unique campaigns
Using JQL with Reducers
For a more precise calculation, you can use JQL with Mixpanel's built-in reducers: LBKSfunction main() { return Events({ from_date: "2023-01-01", // adjust date range as needed to_date: "2023-12-31", event_selectors: [{event: "ideas submission"}] }) .reduce(mixpanel.reducer.avg()); }LBKS
If you want to first count submissions per campaign and then average those counts: LBKSfunction main() { return Events({ from_date: "2023-01-01", to_date: "2023-12-31", event_selectors: [{event: "ideas submission"}] }) .groupBy(["properties.campaign titles"], mixpanel.reducer.count()) .reduce(mixpanel.reducer.avg()); }LBKS
This will first group submissions by campaign, count them for each campaign, and then calculate the average of those counts, giving you the average number of submissions per campaign.Mixpanel JQL Documentation provides more details on using these reducers for calculating averages.You can also use the numeric_summary()
reducer to get more comprehensive statistics: LBKSfunction main() { return Events({ from_date: "2023-01-01", to_date: "2023-12-31", event_selectors: [{event: "ideas submission"}] }) .groupBy(["properties.campaign titles"], mixpanel.reducer.count()) .reduce(mixpanel.reducer.numeric_summary()); }LBKS
This will give you not just the average but also count, sum, standard deviation and other useful metrics about your campaign submissions.
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.