↑ 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.
Go to Plugins > Add New > Upload and select the ZIP file you just downloaded
Click Install Now, and then Activate
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.
↑ 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.
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.Mixpanel API Settings
↑ 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.
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.
↑ 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.
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.
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.
↑ 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:
Check that your Token is correct.
Double-check that your Token is correct 😉
View the source of your homepage to make sure the Mixpanel javascript code exists
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.
Submit a support ticket detailing the issue and that you’ve already taken the steps above.
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.
↑ Back to topQ: 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/cftkdjAEYzEQ: Where can I find out more about what Mixpanel can and can’t do?A: Mixpanel has a great getting started guide and FAQ.