Measure your AdWords campaign with Mixpanel - The Signal
Blog Post

Community Tip: Integrating Google AdWords with Mixpanel

Last edited: Dec 10, 2017

This Community Tip will take you step-by-step through the process used to push Google AdWords campaign information to Mixpanel. This tutorial will ensure your campaign settings in Google are configured correctly. After setting up your campaigns, Mixpanel’s JavaScript SDK will do the rest.

This tutorial is broken into two parts. The first walks through the necessary settings in your Google AdWords dashboard. If you’re using Mixpanel’s JavaScript library, great news! No additional set up or coding is required for ad information to propagate into Mixpanel. If you’re driving traffic to a mobile app, you’ll want to read about mobile attribution with Mixpanel. The latter sections detail an optional and more advanced step-by-step guide that takes you through the process of setting up UTM-tags in parallel with autotagging (typical only for those using both Mixpanel and Google Analytics in parallel).

Enable manual tagging for Mixpanel compatibility

There are two options for adding campaign tracking information to your AdWords campaigns: auto-tagging and manual tagging. Google typically encourages users to turn on auto-tagging, which automatically appends a gclid parameter to the end of your Final URL (generally the URL of your site). In general, AdWords URLs built with this method end up looking like this:

Though this parameter is extremely convenient when using AdWords and Google Analytics (as you don’t have to do any additional work other than turning auto-tagging on) Google prevents this UUID-style value from being resolved to it’s various sub-dimensions (e.g. campaign, source, medium, etc.) from outside of Google’s system.

As a result, you must use manual tagging (where you must pre-append the various campaign data to the AdWords Final URL) to get campaign-level data on your Mixpanel events. Auto-tagging and manual tagging can be used at the same time, though you will need to tweak a setting in Google Analytics to prioritize manual tags over the gclid parameter (we describe this in a later section).

Setting up AdWords to use manual tagging

The first step in the set up process involves tagging your ad URLs with UTM tags – this is the standard way of transmitting campaign attribution data back to your website. If you have the Mixpanel JavaScript SDK installed on the page linked to the ad these UTM properties will be automatically added as Super Properties for any user who lands on that page from a campaign. That means, once you set up manual tagging you’re done! Let’s dive into the step-by-step now.

Log in to your AdWords account and select Campaigns > Ads. Your active AdWords campaigns will appear – hover over the one you want to add manual tagging to and click the pencil icon to edit.

Manual tagging in the Campaigns page. Under the Ads tab, there is a pencil icon next to your ad.

You’ll probably want to do this for all of your campaigns so the relevant UTMs will show up in Mixpanel, but for now we’re going to just customize this single Search Network campaign.

Make sure your site’s URL and AdWords text is all correct, then select “Final URL” and delete the currently entered text. You can add the UTM data yourself, but we recommend using Google’s Custom Campaign URL builder ( to maintain consistency across your campaigns. All you need to do is enter in the values for the various “utm_* style” tags you’d like to use. Mixpanel’s JavaScript lib will automatically grab utm_source, utm_medium, utm_campaign, utm_content, and utm_term if they are present in the URL (and our SDK is active on the landing page) and set these values as Super Properties. Once automatically stored as Super Properties, campaign details will be included with every subsequent event generated by the user – remember that these values will only appear for events sent with the JavaScript library as they’re stored in the browser cookie. You can read more about UTM tags and Mixpanel here:

Once you have the correct values in the form click “Submit” – your new manually tagged URL will appear below the form. Copy and paste this new URL into the “Final URL” field of the campaign’s AdWords settings.

Walkthrough of Adwords' "Using the URL Builder" page.

Save the campaign, and you’re good to go!

Caveats when using auto-tagging and manual tagging together

Now that you’re all set up to use UTMs, you’ll need to revisit the autotagging settings. If you’d like to have both gclid and UTM-style parameters on your URLs you should leave autotagging on – if you don’t use Google Analytics (and therefore have no use for the gclid) you can turn this setting off.

If you’ve previously set up your AdWords campaigns to use auto-tagging (and you don’t plan on using Google Analytics to track your campaigns) you’ll need to disable this in your account settings.

Google Adwords' Preferences page, where "Auto-tagging" can be unchecked under the "Tracking" line.

This final section is more advanced and optional if you only want to pass campaign information into Mixpanel. However, if you’d like to use gclid-style autotagging in parallel with utm-style manual tagging, then read on.

If you’re using Google Analytics and Mixpanel side by side it may be convenient to use both auto-tagging and manual tagging in tandem. This is absolutely possible, though you’ll need to tell Google Analytics to allow UTM values to override gclid values. This will avoid data discrepancies in your Google Analytics instance. This setting can be found in the Admin > Property Settings page of your Google Analytics dashboard.

Beneath the "Advanced Settings" line on the Admin page's Property Settings, there is a checkbox to "Allow manual tagging."

Once you have this override enabled you can send campaigns with both gclid and UTM parameters.

Any questions? Email us at to speak with someone smart, quickly.

Get the latest from Mixpanel
This field is required.