This post isn’t about cookies. It’s about finding a Mixpanel WordPress plugin. I already moaned about cookie notices in a previous blog post. It’s not worth reading, honestly;)
Nevertheless, we live in a world of cookies. If in doubt, just ask the EU “Cookie Club” who came up with the lame idea that all European websites using cookies need to disclose it, and ask the user for consent. A lame idea, since everyone are using cookies it has just resulted in a widespread flood of wasted time for companies spending time and effort getting compliant, and additionally it’s an annoyance for the millions of web users who need to click “yes I now know your site is using cookies get on with the show”…
Anyway, we live in a cookie world. And a world of “big data”. As you could read in my New Year’s Principles for 2014, it’s a year I’ve decided to dedicate to becoming even more user-focused and customer-centric than I’ve ever deliberately been before, up to this point in driving my business. Besides creating value – it also means 2014 is the year I’m diving wholeheartedly into agile and lean startup methods. I’m so excited to see how much I can learn.
On a day to day basis, that’s also why I’ve spent some time today integrating Mixpanel on my site:)
What is MixPanel?
Mixpanel is event-based analytics. Where Google Analytics tracks visits, bounce rates and such stuff, Mixpanel tracks the events your users do (aka steps/actions your users take) on your site. That can answer questions you might have, such as:
- How many users who see my opt-in page actually signs up / opts in?
- How many of those who sign up also confirm their subscription?
- How many subscribers end up purchasing my products?
Those are just some basic questions you can pose and get answers to, within Mixpanel. Much more detailed or specific questions can be setup – but to begin with, just keep it simple.
You can of course run both Google Analytics and Mixpanel simultaneously on your site, no problem there.
Why MixPanel?
Mixpanel is most often compared to its main competitor KISSmetrics. But while KISSmetrics is prohibitively expensive for many small businesses and startups, Mixpanel has a free plan, for those who are just starting out.
Don’t let that fool you into thinking KISSmetrics is necessarily superior to Mixpanel though! Mixpanel was funded by Y Combinator, Silicon Valley’s “Most Exclusive School for Startups”. And in reviews comparing KissMetrics with Mixpanel, Mixpanel gets the nod. Others, slightly prefer KISSmetrics.
See a nice timeline about the evolution of Mixpanel, on their official About page, if you’re curious. It’ll also give you a nice taster of all the possibilities you’ll have, with Mixpanel.
You can think of Mixpanel as tailor-made analytics that makes Google Analytics’ various tools seem archaically coarse, in comparison. The building blocks of Mixpanel are the events your users take. So while Mixpanel may seem daunting at first, it can potentially give you a much clearer image / overview, than Google Analytics’ notorious one-size-fits-everyone-on-the-planet approach, which I personally loathe.
Then there’s Google’s Universal Analytics. But they’re still beaten by Mixpanel.
Mix it up on your website – or in your app
You can use Mixpanel, not only on websites, but also in online apps and mobile apps for Android and iOS.
In fact, Mixpanel is likely most often used in apps – rather than on websites. Maybe that’s why I found the Mixpanel documentation slightly confusing and insufficient at the same time. Frustrating!
App development is for true geeks. A mere mortal design-oriented web designer like me, got lost. I’ll have to admit it has taken me several days… ahem… since Christmas actually… to get started integrating Mixpanel on my WordPress site. It just seemed too daunting.
In reality though, it wasn’t all that bad, once I figured out how! So I decided to share my experiences with you, so you don’t have to jump backwards through the same hoops as I did;)
Here’s your Mixpanel WordPress plugin (in 3 easy steps)
As said, integrating Mixpanel in WordPress wasn’t as easy as I had first anticipated. First you need to include a javascript code snippet, as typically the case with most tracking apps, like Google Analytics for instance. But that’s just the first step. The next step is adding events. That’s more complicated, when one doesn’t know how. And Mixpanel’s own step by step integration tutorial wasn’t of much help.
Step #1 – Install the WordPress Mixpanel plugin
Fortunately, there’s a handy, nifty lil’ WordPress Mixpanel plugin made by the nice fine folks at Pressable. Click the “Download Zip” button, and upload it to WordPress via Plugins > Add New in your WordPress admin.
Step #2 – Input your token
After successful installation of the Mixpanel plugin, go to Settings > Mixpanel Options in your WordPress admin. In most cases, you will only have to input the token. If in doubt about the other two fields, you can read more on the WordPress Mixpanel plugin download page.
What’s your token? Well, that baffled me for a while, but here’s where to find it.
Also be sure to set your domain and timezone in that very same prefs panel!
Step #3 – Add some events
Now that the plugin is up’n’running, it’s time to get some data. Start out by giving some of your key pages some meaningful Event names. These will show up in Mixpanel. There’s now a nifty Mixpanel Event Label box on each of your pages, for that exact purpose.
Done! Voila! Mix it up:)
Beyond the basic WordPress Mixpanel plugin
By default, the plugin only works with pages in WordPress. Not posts, and in my tests; neither custom post types. That’s a bummer of course. Haven’t yet had time to see if that can be done though. But my rationale is: once data starts trickling into Mixpanel, I’ll be highly motivated to use Pressable’s instructions as well as Mixpanel’s official Javascript library documentation, to kick up my Mixpanel WordPress integration a notch or two:)
You can also track your users clicks on buttons and links. It requires some manual work though. Mixpanel’s Javascript library documentation also has some easy-to-follow instructions for that as well.
Lastly, be sure to read Mixpanel’s best practices for integration.
And then, it’s always a good idea to exclude yourself from your statistics. The easy but cumbersome (especially in a corporate setting) is to simply visit Mixpanel’s opt-out page. This will set a cookie in your browser, which tells it you are not to be tracked. You’ll have to do that in each of the browsers, on all the devices you use though. Tip: Bookmark it, and sync your bookmarks across devices.
Another option, for the more geeky among us, is to modify your hosts file by pasting this snippet into your Terminal:
sudo bash -c ‘echo “api.mixpanel.com localhost” >> /etc/hosts’
I haven’t been able to find a way to filter myself out based on my IP address – even though many Mixpanel users crave such a feature. Hmm, strange…
How to use Mixpanel itself?
Well, that’s for another blog post. But I hope I’ve helped you set it up now? Once you start creating and tracking real funnels: the fun begins! There’s so much you can do in Mixpanel. Get it up’n’running if you haven’t already!
Thanks for reading – you’re always welcome to comment or ask if you have any questions?
I just installed and tried activating the latest version of the Mixpanel plugin you recommended (which can be found at https://wordpress.org/plugins/mixpanel-integration/installation/) and received the following error message:
“Plugin could not be activated because it triggered a fatal error.”
Can you recommend another Mixpanel plugin?
Thanks!
Hi Daniel!
Certainly! Check out the Segment.io service and plugin. It works really well!
Oliver
Unfortunately this plugin made every page on my webpage a blank white page. Uninstalling it repaired the issue. Great idea, though!
Here’s a plugin that I have been using for a couple of months now. It works perfectly well. Try it out: https://wordpress.org/plugins/mixpanel-integration
Thanks for mentioning it Eric!
Oliver,
Thanks much for putting together this awesome guide. Worked like a charm and I’m up & running in no time. Appreciate it!
Ryan
Hey Ryan
Cool. Keep an eye on my blog, I might publish more about Mixpanel and WordPress integration soon. No promises though:)
Oliver
Thank so much for putting this guide together. Saved me a bunch of headaches.
Hi Oliver,
I’ve just learned of Mixpanel and being in the WordPress plugin business, I went looking for a plugin and integration techniques straight away and found your post.
Looks like that plugin is pretty old and lacking the features a true WordPress’er would want and need (like metaboxes on Posts and Custom Post Types).
I’ve forwarded all this Mixpanel info to our internal plugin dev team for review and to see if it’s something we want to pick up on developing further.
If we do, I’ll be sure to post back here and let you and your visitors know…
Would be great if you’d do that Adam! More power to you:)
Hi Ken and thanks for this great blog post. I added an Event to a page and called it “Contact Page”. On Mixpanel the new event showed up under the name “viewed page”. Did it do that to you too ?
Hi!
I have the same problem. I assigned event names to some pages but in mixpanel they are all registered as “viewed page”. Any hints how to get this fixed?
Thank you for the guide!
Best, Chris
Did you ever figure out how to get this working with custom post types and posts?
Hey Ken. Not so far, no.