Store Analytics Data

JSON is a attractive option for setting up a custom analytics data store. The flexibility of JSON allows for website owners flexibly store data and get creative in changing tracked data over— all without worring about changing a database schema.

Here’s an example of what an object containing analytics data might look like:

  "other_field": "anything"

Notice some fields are prefixed with an underscore— these denote ‘default’ fields while fields without an underscore are considered ‘custom’ fields. This allows as to create extend our JSON objects, while still providing the bare minimum defaults that would be used in an analytics application. Say for example, in one month of implementing analytics tracking, business requirements change and now it’s important to track a new field ‘widget_type’. Without making a change to a database schema (common with relational databases), we can add the ‘widget_type’ field to analytics object and save.

Over time as tracking requirements broaden, the size (and number of fields) in your analytics objects scales infinitely to meet. When these objects are stored with a great DBAAS (DataBase As A Service) like a(href=””) data can be easily mined for interesting patterns and returned to a dashboard for further visualization. Many web-based data visualization libraries use JSON natively, so starting in this format will be an additional time-saver.