1. Documentation /
  2. WooCommerce Mixpanel

WooCommerce Mixpanel


↑ Back to top
Mixpanel is a real-time web analytics tool that tracks visitors to your site as people, not pageviews. The WooCommerce Mixpanel integration helps you to visualize your online sales funnels and find out which ones are driving revenue and which are not. This plugin tracks over 24 different events and related properties to help you increase your conversion rate and decrease shopping cart abandonment.
As of WooCommerce 8.3, Cart and Checkout blocks are available as the default experience. WooCommerce Mixpanel has not yet been updated to be compatible with those blocks, so we recommend following this guide to revert to Cart/Checkout shortcodes. Additional plugin updates will soon be released to ensure compatibility with the new block checkout. Please check out this page for the latest updates or reach out to our support team with any questions!


↑ Back to top
  1. Download the extension from your WooCommerce dashboard
  2. Go to Plugins > Add New > Upload and select the ZIP file you just downloaded
  3. Click Install Now, and then Activate
  4. Go to the WooCommerce > Settings > Integrations > Mixpanel in your WordPress admin and read the next section to learn how to setup and configure the plugin.

Setup and Configuration

↑ Back to top
Configure the plugin by going to WooCommerce > Settings > Integration. You will see ‘Mixpanel’ listed as an option. Click this to see the settings. Now, log into your Mixpanel account and go to the Account tab. Scroll down and copy the Token listed for your website. Paste this in the Token box. If you are having trouble finding your token, see the Mixpanel tutorial. That’s it! You are ready to start tracking events. If you want to tweak settings and customize event names / properties, continue reading.


↑ Back to top
  • Token – Token from your Mixpanel account page. Leave this blank to disable tracking completely.
  • Nametag Preference – How to identify logged in users: email address (default) or WordPress username. This will display in your People reports and in the live stream as the visitor’s name tag.
  • Logging – Log nothing (default), just queries, just errors, or everything to the PHP error log. Be careful when enabling this on a busy site, as it can quickly flood the PHP error log.
  • Geocode IPs – Allow Mixpanel to geolocate visitors to your website, so you can segment based on the country of visitors.
If you want to turn off all tracking, leave the Token field blank or disable the plugin.
WooCommerce Mixpanel API Settings
Mixpanel API Settings

Customize Event Names

↑ Back to top
Every event name sent to Mixpanel can be changed by editing the text field associated with each event. This is useful if you have an existing implementation and want to keep your event names consistent. It’s recommended that you use past tense verbs when naming events, eg: Use “logged in” vs. “log in” To disable tracking of a particular event, clear the text field associated the event.
  • Signed In – Triggered when a customer / subscriber signs in. The sign in can occur anywhere (wp-login.php, my account page, sign in widget, etc) and it will be tracked. Users are aliased to their email address or wordpress username (depending on the Identity Preference setting) as soon as they login and are tracked as that identity until they logout.
  • Signed Out – Triggered when a customer / subscriber signs out. Identities are cleared upon logout, so if multiple people use the same computers but use different logins, this will help to track them all accurately.
  • Viewed Signup – Triggered when a visitor views the sign up page. Hooks into the wordpress register form and will track anywhere it is used.
  • Signed Up – Triggered when a visitor signs up. Hooks into the wordpress registration system and will track registrations anywhere the wordpress register form is used.
  • Viewed Homepage – Triggered when a visitor views the homepage.
  • Viewed Product – Triggered when a visitor views a single product. Properties: Product Name
  • Added to Cart – Triggered when a visitor adds an item to their cart, either on a single product page or via an AJAX link on category pages. Hooks into the ‘woocommerce_add_to_cart’ action, so custom add to cart links should track as well. Properties: Product Name, Quantity, Category, and Attributes if product is a variation.
  • Removed from Cart – Triggered when a visitor removes an item from their cart. Properties: Product Name.
  • Changed Cart Quantity – Triggered when a visitor increases or decreases the number of units in their cart. This event can be recorded very frequently if visitors to your site tend to have a large number of unique items in their cart. In this case, you can safely disable this event. Properties: Product Name, Quantity.
  • Viewed Cart – Triggered when a visitor views the cart. This will also track when the cart is empty.
  • Applied Coupon – Triggered when a visitor applies a coupon on either the cart or checkout. Properties: Coupon Code.
  • Started Checkout – Triggered when a visitor starts the checkout process.
  • Started Payment – Triggered when a customer starts the payment process. This will only track if you are a using a payment gateway that uses a “Pay” page, such as Braintree TR or Authorize.net AIM (most direct post payment gateways).
  • Completed Purchase – Triggered when a customer completes their purchase. Properties: Order ID, Order Total, Shipping Total, Total Quantity, Payment Method. This will also set First Name, Last Name, Email, and Created Date properties on the visitor for later segmentation.
  • Wrote Review – Triggered when a visitor writes a review of a product. This is tracked before spam processing, so if you get a lot of spam, you can consider disabling this event. Properties: Product Name.
  • Commented – Triggered when a visitor writes a comment on a blog post. This is tracked before spam processing, so if you get a lot of spam, you can consider disabling this event. Properties: Post Title.
  • Viewed Account – Triggered when a customer views the ‘My Account’ page.
  • Viewed Order – Triggered when a customer views an order.
  • Updated Address – Triggered when a customer updates their billing or shipping address.
  • Changed Password – Triggered when a customer changes their password.
  • Estimated Shipping – Triggered when a visitor estimates shipping from the cart page. Properties: Country.
  • Tracked Order – Triggered when a customer submits the ‘Order Tracking’ form.
  • Cancelled Order – Triggered when a customer cancels a pending order.
  • Reordered – Triggered when a customer reorders a previous order.
WooCommerce Mixpanel Event Names
Mixpanel Event Names

Customize Property Names

↑ Back to top
  • Product Name – Recorded when a visitor views a product, adds / removes / changes quantities in the cart, or writes a review.
  • Product Quantity – Recorded when a visitor adds a product to their cart or changes the quantity in their cart.
  • Product Category – Recorded when a visitor adds a product to their cart. Note this is the first category listed for the product. Any additional category names will not be tracked.
  • Coupon Code – Recored when a visitor applies a coupon.
  • Order ID – Recorded when a customer completes their purchase.
  • Order Total – Recorded when a customer completes their purchase. Use this as the ‘revenue’ property within KISS Metrics. This includes shipping,taxes, and any applicable discounts.
  • Shipping Total – Recorded when a customer completes their purchase.
  • Total Quantity – Recorded when a customer completes their purchase. This is the unit total for the order.
  • Payment Method – Recorded when a customer completes their purchase. This is the title of the payment method used for the order.
  • Post Title – Recorded when a customer leaves a comment on a blog post.
WooCommerce Mixpanel Property Names
Mixpanel Property Names

Tracking Subscriptions

↑ Back to top
If you have installed and activated the WooCommerce Subscriptions module, then you are already tracking subscriptions! There’s no need to change anything unless you want to modify the event / property names that are sent.

Subscription Events

↑ Back to top
  • Activated Subscription – Recorded when a customer’s subscription is activated. Note that subscriptions are typically only activated after successful payment. Includes properties: Subscription Name, Total Initial Payment, Initial Sign up Fee (if applicable), Subscription Period, Subscription Interval, Subscription Length, Subscription Trial Period, Subscription Trial Length
  • Subscription Trial Ended – Recorded when the free trial for a subscription ends. Includes properties: Subscription Name
  • Subscription Expired – Recorded when a customer’s subscription expires. Includes properties: Subscription Name
  • Suspended Subscription – Recorded when a customer’s subscription is suspended. Includes properties: Subscription Name
  • Reactivated Subscription – Recorded when a customer’s subscription is reactivated. Includes properties: Subscription Name
  • Cancelled Subscription – Recorded when a customer’s subscription is cancelled. Includes properties: Subscription Name
  • Renewed Subscription – Recorded when a customer’s subscription is renewed. This can happen for both automatic renewals and manual renewals. Includes properties: Billing Amount and Billing Description.

Subscription Properties

↑ Back to top
  • Subscription Name – The name of the subscription product
  • Total Initial Payment – The total initial payment for the subscription. Includes recurring amount and sign up fee.
  • Initial Sign Up Fee – The initial sign up fee for the subscription. If none is set, this will be zero.
  • Subscription Period – The period (e.g. Day, Month, Year) for the subscription.
  • Subscription Interval – The interval (e.g. every 1st, 2nd, 3rd, etc) for the subscription.
  • Subscription Length – The length (e.g. 8 weeks, 6 months, 1 year) of the subscription.
  • Subscription Trial Period – The period (e.g. Day, Month, Year) for the subscription trial.
  • Subscription Trial Length – The length (e.g. 1-90 periods) for the subscription trial.
  • Billing Amount – The amount billed to the customer when their subscription renews.
  • Billing Description – The name of the subscription billed for subscription renewals.

Tracking Custom Data

↑ Back to top
If you already work with a developer, you can track custom events and user properties within Mixpanel.

Tracking Custom Events

↑ Back to top
You can track custom events by using:
wc_mixpanel()->get_integration()->custom_event( $event_name, $properties );
Event name can be set as a string, while properties are passed as an array with property name => value. The custom_event() can also be called without properties by omitting the second parameter. You can modify this sample snippet according to your needs with the help of a developer.

Tracking Custom User Properties

↑ Back to top
You can also track custom properties about your customers to display in the customer’s Mixpanel profile using:
wc_mixpanel()->get_integration()->custom_user_properties_api( $properties, $user_id );
Here’s some example placeholder code, along with a live example to show the last subscription amount billed: View sample code.

Privacy & cookies

↑ Back to top

Cookie usage

↑ Back to top
Mixpanel uses cookies as a service to track user behavior. As such, depending on your business location, you may be required to inform users that your site places these cookies. A plugin for cookie consent may be useful for this.


↑ Back to top
As a data controller, it is your responsibility to ensure your site and data processors you use are GDPR-compliant, abide by the PECRs, and that you have a lawful basis for data processing. So long as no personal customer data is used in your site analytics (data is anonymized), this data is not subject to the GPDR. However, if your Mixpanel site uses profiles with identifiable information, then you should delete these profiles when personal data erasure requests are submitted to your site. Mixpanel has information on their GDPR-compliance here, along with a GDPR FAQ here.


↑ Back to top
Not seeing tracking data in Mixpanel? Follow these steps to make sure everything is setup correctly before posting a support request:
  1. Check that your Token is correct.
  2. Double-check that your Token is correct 😉
  3. View the source of your homepage to make sure the Mixpanel javascript code exists
  4. Use the “Streams” view within your Mixpanel account to see if tracking data is being logged correctly. Click on “Events” and then open a different browser (or an incognito window within Google Chrome) and browse to your site and perform a few actions. You should see yourself show up in the “Events” view.
  5. Submit a support ticket detailing the issue and that you’ve already taken the steps above.

Known Issues

↑ Back to top
  • Admin / Shop Manager users are still tracked as “Visited Site” when visiting the website to login. There is no way to prevent this, since we don’t know they’re admin users until they login.
  • If a customer is click happy and double / triple clicks an AJAX add to cart link, the ‘added to cart’ event may be recorded multiple times.

Frequently Asked Questions

↑ Back to top
Q: Why do I not see any data for “People”? A: People data is sent when a customer places an order, after which you’ll see this sort of data: https://cloudup.com/cftkdjAEYzE Q: Where can I find out more about what Mixpanel can and can’t do? A: Mixpanel has a great getting started guide and FAQ.

Questions & Support

↑ Back to top
Have a question before you buy? Please fill out this pre-sales form. Already purchased and need some assistance? Get in touch with support via the help desk.