Web Analytics in 10 minutes

SlicingDice Team
SlicingDice.com Blog
6 min readApr 23, 2017

Go from zero to web analytics hero in less than 10 minutes, without managing any infrastructure or worrying about data modeling and size.

This guide will show how to use SlicingDice for web analytics, a Serverless Data Warehouse and Analytics Database as a Service.

Everyday SlicingDice receives more than 1.1 billion data inserts and millions of queries from multiple indie devs and companies, many of them doing analytics on top of website data, such as visits and page views.

Scenario description

Let’s imagine you collect web page access data for web analytics purposes in order to understand how your website is being used and to collect information on its pages contents.

Example of web analytics questions we want to answer:

  1. What was the average load time of our webpages in the past week?
  2. How many webpages from our website containing the words “love” and “peace” were accessed more than 3 times in the past 7 days?

Sending your web page access data to SlicingDice

Sending data to SlicingDice is very simple and fast. You can use our easy-to-use API or any of our clients available in Python, Ruby, JavaScript, Java, .NET/C#, PHP, Go and Arduino.

In order to send your data, first you simply need to:
1. Define what your entity is going to be. We consider an entity to be like a user, a page, a server and so on. That’s basically a way of saying: who owns the data? So looking both questions above, the data is clearly produced by a web page, so we can consider each web page to be an entity.

2. Once you know what is your entity, you simply need to specify the columns and values you want to associate to your entities.

Check this data insertion example below

Pro Tip: Click here to generate a personal free demo API Key, so you can copy & paste all the cURL command examples below on your own terminal and play with it live using our /test endpoint.

In this example below our entities are web pages and we will be inserting page load times for each one of them.

Looking this data insertion command above, we can clearly see that we have three web page entities: /index, /contact and /dashboard.

All entities are sharing the same column called loadtime, although each entity has its own values and dates associated to the column.

What is happening here is that you are telling SlicingDice to store that the entity /index had a loadtime of “1.223” on date “2017–xx–xxT02:33:09Z”, and the entity /contact had a loadtime of “2.348” on date “2017–xx–xxT12:30:18Z” and so on.

Before starting to query this data, let’s see another insertion example:
Again: if you paste your personal demo API key on this cURL command below and execute it on your terminal, it will really work. Go ahead and try yourself.

In this example below our entities are still web pages and we will insert all the visits and the page views generated by visitors.

Again, we can clearly see that we have three web page entities: /index, /contact and /blog/feelings.

For these three entities we associated two columns: words and actions.

As you can see, all entities /index, /contact and /blog/feelings have the same columns words and actions, but each with different values.

What is happening here is that you are telling SlicingDice that the words of the entity /index are [”welcome”, “slicingdice”, “data”, “warehouse”, “analytics”, “database”, “service”] and also that the actions was “access” on “2017–xx–xxT02:33:09Z”, on “2017–xx–xxT04:57:11Z” and so on.

The exactly same thing is happening for the entities /contact and /blog/feelings, but with different words and actions.

That’s it. Simple like that. As we now have some data stored, let’s answer the questions we defined in the beginning of this post:

  1. What was the average load time of our webpages in the past week?
  2. How many webpages from our website containing the words “love” and “peace” were accessed more than 3 times in the past 7 days?

Querying your data

Making queries on SlicingDice is simple and easy. It’s possible to do multiple types of analysis using our API and you can get to speed by seeing all the ready-to-use query examples we have on our Github clients repositories for Python, Ruby, JavaScript, Java, .NET/C#, PHP, and Go.

In order to answer the question What was the average load time of our webpages in the past week? we will be making an aggregation analysis.

Aggregation is a powerful way to cross data in order to find insights and unexpected patterns. You can think about it like being an Excel Pivot Table.

What is happening on this aggregation query below is that we are asking SlicingDice to get the average of all the “loadtime” values that took place between “now” and “1 week ago”.

Based on the data we inserted before, if you run this query above on your own terminal, you should be able to see these results below:

As you can see, the result is basically showing the average load time from all page load times stored in the past 7 days. You can answer a lot of questions using aggregations and more importantly, discover insights out of your data.

Now let’s answer the second question we have: How many webpages from our website containing the words “love” and “peace” were accessed more than 3 times in the past 7 days?. We can easily answer this question by using the count entities analysis.

Count entities is a simply and fast way to know how many unique entities (web pages) you have that satisfies some set of conditions you define.

Let’s take as example our query below, what is happening here is that we want to know how many unique web pages (entities) have the “words” column with “love” AND “peace” values AND that had more than 3 “actions” values between “now” and “7 days ago”.

Note that we are putting a name for this query (love-and-peace-with-3-or-more-accesses) because our API accepts making multiple count queries in a single request.

Based on the data we inserted before, if you run this query above on your own terminal, you should be able to see these results below:

As you can see, the result is basically showing that there is 1 web page (entity) with both words on content and that were accessed more than 3 times in the last 7 days.

Now, if you want to know what web pages (entities) are these, you can simply make this result data extraction query below:

As you can see below, it’s showing that the web page /blog/feelings is the one that has the words and was accessed more than 3 times in last 7 days.

What other questions and analysis can I make?

SlicingDice supports multiple types of data analysis, so you can basically answer any kind of question you may need for analytics purposes, for example:

  • What ware the main referrers for each web page
  • What are the top entry and exit pages of my website?
  • What was the distribution of the most accessed pages per day in the past month?
  • What are the most accessed pages containing “election” in their title?

You nailed it, hero! — Next steps

That’s it. You are now ready to start making as much web analytics as you want.
If you are inclined to think that SlicingDice might work for you, we suggest you take a look on our documentation and at least follow our quickstart guide.

Please, don’t hesitate to contact our developer support team at any time, for any reason. We are here to support your needs.

Loved it… but, how much does it cost?

Our price is really innovative and cheap. We charge based on the quantity of columns you have, doesn’t matter how many rows you store for them.

So for example you can store unlimited data on SlicingDice for these two use cases presented above (web pages, for example) for less $ 10.00 per month. It’s true. Check our website pricing page.

Why SlicingDice?

Developers want to store and query their data, but they hate having to manage complex data infrastructure, so we do it for them.
All they have to do is simply store and query billions of real-time and historical data, without managing any infrastructure.

High availability?
You don’t need to worry. We always replicate and backup your data on three different datacenters, located in France, Canada and Germany.

Query speed?
If any query takes longer than 10 seconds to complete, no matter the query complexity or data size, you receive a 10¢ discount for each query. We believe ensuring fast queries is our responsibility, not yours.

Not sure if we can support your needs?

Click here and schedule a 15-minute talk with our developers, totally free of charge, so we can evaluate your case together.

Don’t know how to model your data in order to send it to SlicingDice?
No problem at all, schedule a time so we can talk or let’s chat online now.

--

--

SlicingDice Team
SlicingDice.com Blog

Dev team of SlicingDice — Serverless Data Warehouse and Analytics Database-as-a-service