Mixpanel Community Icon

Custom Event for Accurate UTM Tracking in Subscription Funnels

·
·

i am using session start with breakdown of UTM campaign in order to measure subscription funnel. This gives me wrong result when using the breakdown becuase session start event captures the FIRST utm that it finds, in specific cases: when user for example land from direct source, then he subscribes and opens welcome email, then the session start UTM shows the email as source instead of direct (because the direct had no UTM). How can i build a custom event that will only treat the first page view in a session?

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

    Hi Sagi, 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
    ·
    ·

    To address your issue with Session Start capturing the wrong UTM source for your subscription funnel analysis, you can create a custom event that focuses on the first page view of a session. This approach will help you accurately attribute the correct UTM parameters to the session start. Here's how you can do this:1. First, you'll need to implement last-touch UTM tracking as described in the Mixpanel documentation on Traffic Attribution. This will ensure that you're capturing the most recent UTM parameters for each user interaction.2. Next, you can create a custom event that combines the "Session Start" event with the first page view of the session. Here's how to create a custom event: Custom Events documentation: 1. Expand the Event dropdown in either an Insights, Funnels or Retention report. 2. Select the plus button to the right of the search bar. 3. Select the events and properties you'd like to include. In this case, you'll want to include: - "Session Start" event - "Page View" event (assuming you're tracking page views) 4. Add a filter to ensure it's the first page view of the session. You might need to add a custom property to your page view events to indicate their order within a session. 5. Name your custom event (e.g., "First Page View of Session"), and click Save.3. Use this new custom event in your funnel analysis instead of the regular "Session Start" event. This should give you more accurate attribution for the start of each session.To ensure you're capturing the correct UTM parameters for the first page view, make sure you're implementing UTM tracking correctly. The Mixpanel documentation on UTM Properties mentions that Mixpanel's Javascript library tracks all UTM tags by default, including utm_source, utm_medium, utm_campaign, utm_content, and utm_term.If you're still experiencing issues after implementing these steps, you might need to review your overall implementation of Mixpanel tracking, especially focusing on how you're capturing UTM parameters and page views. Consider reaching out to Mixpanel support for more personalized assistance with your specific setup.

    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 Sagi
    Sagi
    ·
    ·

    not clear to me how to filter the first page view of a session without changing my tracking setup

  • Avatar of Sagi
    Sagi
    ·
    ·

    kapa.ai not clear to me how to filter the first page view of a session without changing my tracking setup

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

    Let me check the knowledge base for you again. One moment! đź“š

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

    I apologize for the confusion in my previous response. You're right to point out that filtering for the first page view of a session isn't straightforward without changing your tracking setup. Let me provide a more accurate and helpful answer based on the available information.To filter for the first page view of a session without changing your tracking setup, you can leverage Mixpanel's "First Time" filter feature. Here's how you can do this:1. Use the "First Time" filter on your page view event within a session. According to the Mixpanel documentation on Analyzing First Time Users, you can add a First Time Filter to any event in Mixpanel. This filters the event down to only the first instance of the event performed by a user within the specified time frame.2. To apply this to your use case, you would: - Select your page view event (e.g., "$mp_web_page_view" if you're using automatic page view tracking) - Apply the "First Time" filter - Set the time frame to "within the same session"This approach should allow you to capture only the first page view of each session without requiring changes to your tracking setup.However, it's important to note that this method might have some limitations:1. As mentioned in the documentation, if there's a tie in timestamps (e.g., multiple page views in the same second at the start of a session), all of those events will be considered "first time" and will match the filter.2. This method relies on Mixpanel's session definition. Make sure your session settings are configured correctly for your use case.If you find that this approach doesn't fully solve your issue with UTM attribution, you might need to consider adjusting your tracking setup or explore more advanced custom event creation options. In that case, it would be best to consult with Mixpanel support for a solution tailored to your specific implementation.

    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.