DataMuse | Monetise Your Data
Get practical insights that impact the bottom line.
growth_hacking_datamuse_sydney_4.jpg

The Muse

We blog here about growth and data.

Don't Implement Analytics Without Reading This First

Before you start to track visitors and customers on your website, you should know what your options are and part of that is understanding how activity is tracked online: by first-party and third-party cookies, and how to hook up analytics platforms.

Read on for what you need to know.

Cookies are the online version of a loyalty card.

How am I being tracked by first-party cookies?

Cookies are an online version of a loyalty card. When you browse online, they tell the website you're visiting who you are, what you've done in the past, and that allows the website to customise your browsing experience.

On the web, cookies are text files that the server sends to the browser along with the website HTML contents. Every time you request more information from the website by pressing a button or playing a video, the server recognises that you’re doing this because your browser sends your cookie back to the server along with your request.

This describes first-party cookies, or those sent along to the server by the site you're visiting. These are often required for a full browsing experience and they differ from third-party cookies.

How am I being tracked by a third-party cookies?

How exactly does the itty-bitty bit of JavaScript code below, pasted into the HTML code of your site…

data-visualization-examples.png

..allow analytics platforms to track so much information about visitors? Third-party cookies. Here's how they work:

  1. You navigate to a URL of a website with analytics installed
  2. Your browser requests the contents of the URL from the server that hosts it
  3. The server responds by sending your browser the HTML code of the URL, and this contains the script above
  4. Your browser executes this code and renders the website
  5. On exectution, this bit of code instructs your browser to contact the analytics servers
  6. The analytics server sends back to your browser their own (third-party) cookie, which enables the analytics platform to track what you do in the session.
  7. Voila! Now, everything you do on the site (event) that causes a server request, will also make your browser contact the analytics platform so that all of your actions will be stored against their (third-party) cookie too.

Don't want to entrust your data to a third-party? That's cool. Take analytics server-side.

Another type of event tracking is on the server side. In this case, instead of putting the snippet of code inside the HTML of the website, the company that owns the website keeps it within their own servers. Why would you want that?

  1. You can track incognito. Users now can’t tell if or that you’re tracking their behaviour on your site and ad-blockers can’t stop you tracking events that users of your website trigger (there are ad-blockers that can prevent any/all events from being sent from your browser to analytics platforms by the way!)
  2. You track server calls instantly. It also allows you to easily track info like when a visitor last logged in, how many sessions this user had in a week. The server has that info readily accessible, and it can all be sent onto the analytics platform.

The downside to server-side analytics is that you may not be tracking every possible event; you'll only track events that trigger a server call.

That means that events performed on your site that don't require a server call, for example, if a user closes a pop-up window, the event won't register because closing a pop-up doesn't trigger a server call.

What about third-party analytics platforms?

You can quickly get caught in a data vortex of noise, noise, noise... making it hard to hear the signal.

Third party analytics platforms - and there are many - are "off the shelf" so it's reasonably easy to get up and running quickly. Depending on how you implement, they can track both server-calls and website actions, giving you a complete picture of how visitors are using your site. Third-party platforms are also built with the intention of making data analysis easier, so there is a big focus on UI. They try to put your data into a digestible framework for you but this does give you somewhat less flexibility in working with your data in ways that fall outside of that framework.

Another word of caution: there are many platforms out there to choose from, so be sure you choose the right one for your needs. Also, setting the platform up to track absolutely every event is great in theory, but you can quickly get caught in a data vortex of noise, noise, noise... making it hard to hear the signal.

Implementing third-party analytics intelligently and effectively takes some know-how.

So what about writing your own, custom-built analytics?

Custom built analytics are definitely a nice to have and the largest, most data-driven companies build their own. But if you’re starting out you probably won’t go down that path, and – we’d suggest – you really shouldn’t.

Third-party platforms are off the shelf, have great UI and you can start tracking with a quick copy/paste into your HTML header code. Custom built analytics are none of those to start.

Additionally, there is some database Kung-Fu that needs to happen to make the vast amounts of unstructured data that is being recorded actually become useful (and this is one step before a beautiful dashboard).

If you only ever have some 10 users use a website, you probably can go ahead and implement your own analytics, although will still end up to be a fantastic waste of developer time. But if you have thousands, 100’s of thousands, well, then the Kung-Fu gets Confucius, but it’s certainly a nice problem to have.

Want to know more? Get in touch with us here.