Bootstrap website add analytics to it?

Google Analytics is generally going to be the easiest to implement and easiest to use. Just bear in mind since you're using static pages you're going to need to put the analytics script in every page or it won't be tracked.
 
you're going to need to put the analytics script in every page or it won't be tracked
Not true. There is an easy way to do it. Simply take the code and create a .js file with it and include one line of code in the head of your pages. OR, you can add the code into an existing .js file that is already included on every page. Code for .js below.

HTML:
/* This goes into the head of your webpages
<script src="js/analytics.js"></script>
Code:
// Save this as analytics.js

$(document).ready(function () {
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-YOUR_NUMBER', 'auto');  // Make sure to use your number here
  ga('send', 'pageview');
});
 
Last edited:
Depending on what sort of analytics you're looking for, your hosting may have AWStats or other basic analytics packages that provide information based on the actual traffic logs.
 
Back
Top