To track your website’s bandwidth usage, you need to consider all the content delivered by your web server. This includes images, scripts, css, font files, documents, html pages, audio and video files, and more.
Google Analytics doesn’t track bandwidth because it doesn’t “see” all the content delivered by your web server. But there are two options for seeing bandwidth data if you use Google Analytics:
Option 1: Free
For each pageview, fire off an event that contains a bandwidth value. The value can be the average size of pages on your site.
We suggest using an Event Label of “Bandwidth” for this solution.
Google Analytics updates their code periodically, so please refer to GA documentation for proper syntax:
Event Tracking Instructions (analytics.js):
This option is better than nothing…but it isn’t very accurate because it won’t track bandwidth for:
- Visitors who block tracking requests or tracking code
- Dev & admin pages that aren’t tagged with Google Analytics code
- Direct-linked files
- Robots and crawlers
Option 2: Accurate
Your web server creates log files that keeps track of all the content delivered to visitors. Using web analytics software, you can process these logs and create an accurate bandwidth usage total.
Web server log files contain additional useful data, like:
- Page errors
- IP addresses
- Broken links
- Hidden visitors (i.e. who block GA tracking requests)
Angelfish Software processes web server logs and creates useful reports for any websites, internal or external.