Explain thoroughly how initial utm source and utm source work
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
In Mixpanel, UTM parameters are important tracking elements that help you understand where your users are coming from and attribute conversions to marketing efforts. Let me explain how both initial UTM source and regular UTM source work:
UTM Source
UTM source is an event property that Mixpanel collects automatically when using the JavaScript SDK. It captures the source of traffic for each visit or interaction. This parameter identifies which website, search engine, or campaign sent the traffic to your site.The JavaScript SDK automatically collects UTM parameters (including utm_source, utm_medium, utm_campaign, etc.) from the URL when a user visits your site. These parameters are attached to events as properties when they occur during that session.As noted in the documentation, UTM parameters are:
"UTM tags derived from the URL a customer clicked to arrive at your domain. Each UTM will be collected under its own property." Default Properties
Initial UTM Source
Initial UTM source (initial_utm_source) is a user property that captures the very first UTM source a user was exposed to before interacting with your product. This is particularly valuable for first-touch attribution models.The key difference is that: - Regular UTM source changes with each new visit that contains UTM parameters - Initial UTM source is set only once when a user first arrives at your site with UTM parametersAccording to Mixpanel's documentation:
"Initial UTM Parameters [are] 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 Properties
Use Cases
Initial UTM source is particularly valuable for marketing attribution. As mentioned in Mixpanel's blog:
"For this report, we're leveraging a first-touch user-level attribution model to calculate the revenue generated by users initially reached by specific campaigns. This provides a clear measure of the impact of top-funnel initiatives. In Mixpanel, we can accomplish this using the built-in Initial UTM Campaign user variable." Marketing reports that calculate campaign ROI
Implementation Notes
1. The JavaScript SDK automatically tracks both regular and initial UTM parameters. 2. For server-side implementations, you'll need to manually add UTM parameters to your tracked events: ```
assumes query parameters are available as Flask request.args dict
utm_keys = ["utm_source", "utm_medium", "utm_campaign", "utm_content", "utm_term"] utm_values = {key: request.args[key] for key in utm_keys if request.args.get(key)} properties.update(utm_values)```Server-Side Best Practices3. UTM parameters are crucial for multi-touch attribution models in Mixpanel, which help you understand the full user journey before conversion.By leveraging both types of UTM source tracking, you can gain insights into both the initial acquisition channel that brought users to your product and the ongoing marketing touchpoints that influence their journey.
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.