The Mixpanel JavaScript library automatically detects:
- utm_source: track the source where traffic is coming from, including a website or advertiser
- utm_medium: track the advertising medium, including email and banner ads
- utm_campaign: track the campaign name associated with the traffic
- utm_content: track the specific link within in an ad that a user clicked
- utm_term: track keywords associated with campaigns
If they are present in your URL and sets them as Super Properties. Mixpanel only tracks first touch UTM parameters by default.
UTM Parameters (utm_ parameters)
UTM stands for Urchin Traffic Manager (Urchin was renamed to Google Analytics after Google bought them, but the utm_ convention stuck), and is a convenient way to tag links to various landing pages on the web. If you are driving traffic to a certain landing page, say http://example.com/landingpage you might want to know which of your marketing efforts is most effective at driving total traffic and more importantly at bringing in qualified traffic. For a simple example, let's say you are driving traffic to this page from a Google AdWords Campaign and send an email blast to your existing customers. For the AdWords campaign you would send your users to the following url:
http://example.com/landingpage?utm_source=adwords
This wouldn't change the content on the page, but Mixpanel would detect that utm_source parameter and register a super property, associating all that customer's events with the proper utm_source. The link in your email campaign you would go to this url:
http://example.com/landingpage?utm_source=email_newsletter
The utm_source in this case would be email_newsletter. Once you have a traffic flowing to a landing page with a utm_ parameter you can breakdown by that utm_ parameter. Below is a landing page to sign up funnel broken down by utm_source:
Advanced Usage
You can combine utm_source, utm_medium, utm_campaign, utm_content into a single URL so you can slice different ways:
- utm_medium is generally the highest grouping, indicating the overall channel (PPC, E-Mail, etc).
- utm_source is the next level, answering the question which provider within the channel brought the traffic (AdWords, Bing, E-Mail Newsletter)
- utm_campaign is the next level down, describing your actual marketing campaign ('Snow Boots') and
- utm_content can describe variations in the content and message of your campaigns (for example some ads might advertise'Warm Snow Boots' and others might advertise 'Durable Snow Boots'). An URL with a fully baked set of campaign parameters would look like this:
Multiple Site Visits from Different Campaigns
By default, we use "first touch" attribution for the utm_ parameters. As long as your customer doesn't clear their cookies or come from a different device, Mixpanel will remember the original utm_source. If you'd like an example of how to track last touch attribution, refer to this Community Tip.