if I landed on a page through campaign that contain utm parameters and then go to two to three pages why it is happening that utm parameters are not passing with all the other action perfomed as the utm source, medium and all are persisting in nature so it should come with all the action perfomed by the user in mixpanel ?
Hi Sonia, 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
I understand your question about UTM parameters not persisting across multiple page views in Mixpanel.When a user lands on your site through a campaign with UTM parameters, Mixpanel's JavaScript SDK automatically captures these UTM parameters for the initial page view event. However, these UTM parameters don't automatically get attached to subsequent events as you navigate through different pages.This happens because UTM parameters are typically only present in the URL of the landing page. When a user navigates to other pages on your site, those UTM parameters are no longer in the URL unless you're specifically passing them along in your internal links.To ensure UTM parameters persist across all user actions, you have a few options: 1. Use Super Properties: You can register UTM parameters as super properties when a user first lands on your site. Super properties will automatically be included with all subsequent events.LBKS// When user first lands with UTM parameters mixpanel.register({ "utm_source": "facebook", "utm_medium": "cpc", "utm_campaign": "summer_sale" });LBKS
2. Use Initial UTM Parameters: Mixpanel's JavaScript SDK automatically captures initial UTM parameters as user profile properties (prefixed with "initial_"), which you can use for attribution analysis Tracking UTM Parameters.For attribution analysis specifically, Mixpanel's attribution feature is designed to look back at touchpoints (including those with UTM parameters) within a specified window before a conversion, so you don't necessarily need UTM parameters on every single event How multi-touch attribution helps teams make data-driven decisions.If you're implementing server-side tracking, you'll need to manually pass UTM parameters to each event as they're not automatically captured like in the client-side SDK Server-Side Best Practices.
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 partially correct, but there's an important distinction to make about how UTM parameters work in Mixpanel's client-side implementation.Mixpanel's JavaScript SDK does automatically capture UTM parameters from the URL, but they are captured as regular event properties for that specific event, not as super properties by default.According to the documentation, UTM parameters are collected as individual event properties when a user lands on your site: > "UTM tags derived from the URL a customer clicked to arrive at your domain. Each UTM will be collected under its own property." Default PropertiesAdditionally, Mixpanel captures "initial" UTM parameters as user profile properties (with the prefix "initial_"): > "UTM tags seen for the first time from the URL a customer clicked to arrive at your domain. Each UTM will be collected under its own property." Default User PropertiesIf you want UTM parameters to persist across all events (as super properties), you need to explicitly register them as super properties yourself: LBKS// Register UTM parameters as super properties mixpanel.register({ "utm_source": urlParams.get('utm_source'), "utm_medium": urlParams.get('utm_medium'), "utm_campaign": urlParams.get('utm_campaign') });LBKS
This is mentioned in the documentation about special types of properties: > "Mixpanel's client-side SDKs provide a method that allows you to register / save the property in a cookie or local storage and auto-appends it in subsequent event tracking calls." Special Types of PropertiesSo while Mixpanel does capture UTM parameters automatically, you need to explicitly register them as super properties if you want them to persist across all events.
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.