Mixpanel Community Icon

Copying Custom Events from Staging to Production in Mixpanel

·
·

We make use of custom events in Mixpanel production project. We have a separate staging project that our staging app tracks events to. I would like to be able to set up a dashboard to monitor a new feature before going live in production but I would need to be able to create the same custom events in both the staging and production project. Is it possible to create custom events in the staging project and then copy them into the production project without manually recreating them?

  • Avatar of kapa.ai
    kapa.ai
    APP
    ·
    ·

    Hi Dan, 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

  • Avatar of kapa.ai
    kapa.ai
    APP
    ·
    ·

    Yes, you can migrate custom events from your staging project to your production project without manually recreating them. Mixpanel provides a few approaches for this:

    Using Lexicon Export/Import

    You can use Mixpanel's Lexicon feature to export your custom events definitions from staging and import them into production: 1. Export your custom events definitions from the staging project using Lexicon CSV Export 2. Import these definitions into your production project using Lexicon CSV ImportThis approach is mentioned in the Migrating Reports and Non-Data Entities documentation.

    Using Lexicon Schemas API

    Alternatively, you can use the Lexicon Schemas API to programmatically transfer your custom events definitions between projects. This would involve: 1. Using the API to extract the custom events definitions from your staging project 2. Using the API to create those same definitions in your production projectThis is also referenced in the migration documentation.

    Moving Boards with Custom Events

    If your custom events are used in dashboards/boards, you can use the Move Board feature to transfer entire boards between projects. However, note that: - Custom events don't automatically move with the board - You'll need to create the custom events first before moving the board - After moving, verify that all reports using custom events work properlyAs mentioned in the documentation: "Any saved cohorts, custom events, custom properties, lookup tables would need to be created first as they don't get automatically moved as part of the Move Board."If you need further assistance with this process, Mixpanel's support team is available to help as noted in their documentation.

    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.

  • Avatar of Dan
    Dan
    ·
    ·

    The Lexicon Export/Import does not appear to be available for custom events. I've checked both in the documentation and in the application. It is only available for Events, Event Properties, and Profile Properties but not for Custom Events. The Lexicon Schema API is similar. It doesn't appear that you can create Custom Events via the Lexicon API