A Mixpanel WordPress Plugin (in 3 easy steps)

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:)

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.

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.

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.

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?