Web analytics involves collecting, processing, visualizing web data to enable critical thinking about how users interact with a web application.
User clients, especially web browsers, generate significant data while users read and interact with webpages. The data provides insight into how visitors use the site and why they stay or leave. The key concept to analytics is learning about your users so you can improve your web application to better suit their needs.
It's easy to get overwhelmed at both the number of analytics services and the numerous types of data points collected. Focus on just a handful of metrics when you're just starting out. As your application scales and you understand more about your users add additional analytics services to gain further insight into their behavior with advanced visualizations such as heatmaps and action funnels.
If your application is selling a product or service you can ultimately build a user funnel (often called "sales funnel" prior to a user becoming a customer) to better understand why people buy or don't buy what you're selling. With a funnel you can visualize drop-off points where visitors leave your application before taking some action, such as purchasing your service.
Piwik is a web analytics platform you can host yourself. Piwik is a solid choice if you cannot use Google Analytics or want to customize your own web analytics platform.
Google Analytics is a widely used free analytics tool for website traffic.
Clicky provides real-time analytics comparable to Google Analytics' real-time dashboard.
MixPanel's analytics platform focuses on mobile and sales funnel metrics. A developer builds what data points need to be collected into the server side or client side code. MixPanel captures that data and provides metrics and visualizations based on the data.
KISSmetrics' analytics provides context for who is visiting a website and what actions they are taking while on the site.
Heap is a recently founded analytics service with a free introductory tier to get started.
CrazyEgg is tool for understanding a user's focus while using a website based on heatmaps generated from mouse movements.
Building an Analytics App with Flask is a detailed walkthrough for collecting and analyzing webpage analytics with your own Flask app.
Pandas and Google Analytics shows how to use pandas for data analysis with Google Analytics' API to perform calculations not available in the tool itself.
Build a Google Analytics Slack Bot with Python explains how to connect the Google Analytics API to a Slack bot, with all the code in Python, so you can query for Google Analytics data from your Slack channels.
Build your own Google Analytics Dashboard in Excel show how to extract your Google Analytics data via their web API and Python helper library so it can be used in other tools such as Excel.
The official Google Analytics Python quickstart isn't really the easiest tutorial to follow due to all of the configuration required to make your first API call, but it is still the right place to go to get started.
How Accurately Can Prophet Project Website Traffic? uses the data forecasting tool Prophet to see if it is possible to predict future trends in website traffic based on historical data.
The Google Analytics Setup I Use on Every Site I Build is a tutorial written for developers to better understand the scope of what Google Analytics can tell you about your site and how to configure it for better output.
This beginner's guide to math and stats behind web analytics provides some context for understanding and reasoning about web traffic.
This post provides context for determining if a given metric is "vanity" or actionable.
This series on measuring your technical content has a bunch of advice for figuring out why you want to gather metrics, how to do the instrumentation and determining your success factors.
awesome-analytics aggregates analytics tools for both web and mobile applications.
10 red flags signaling your analytics program will fail is a more business-focused piece but it has sosme good information and visualization on broader themes that developers who work in larger organizations should think about when it comes to analytics.
Add Google Analytics or Piwik to your application. Both are free and while Piwik is not as powerful as Google Analytics you can self-host the application which is the only option in many environments.
Think critically about the factors that will make your application successful. These factors will vary based on whether it's an internal enterprise app, an e-commerce site or an information-based application.
Add metrics generated from your web traffic based on the factors that drive your application's success. You can add these metrics with either some custom code or with a hosted web analytics service.
Continuously reevaluate whether the metrics you've chosen are still the appropriate ones defining your application's success. Improve and refine the metrics generated by the web analytics as necessary.
Fix errors in your Python code before your users see them by monitoring with Rollbar.
Deploy web apps with the Ansible configuration management tool.