The first web-analytics tool was 'hit counters', which were chunks of code that used a simple PHP script to display an image of a number that incremented every time the script ran.