Analyze a php-based website with minimum configuration. Features include: hit counter, user analysis, ab tests, and user profiling.

0.0.2 2018-12-22 17:54 UTC


MIT License Scrutinizer Quality Score

SiteAnalyzer is a package created to perform analysis of sites developed in PHP. SiteAnalyzer can be installed into any PHP site that fits the requirements in minutes. SiteAnalyzer makes use of machine learning algorithms and statistics to create powerful reports and analysis.


  • Page counter/analysis
  • Report of pages per User
  • PSR-4 compatible.


You can install SiteAnalyzer through Composer:

$ composer require rdorado/site-analyzer

Or modify your composer.json requirements:

    "require": {
        "rdorado/site-analyzer": "^0.0.1"

and then update your project:

$ composer update


Count all the views/pages you want to observe by importing the SiteAnalyzer class and then using the count static method:

use SiteAnalyzer\SiteAnalyzer;


You can also include other options to be stored on the database. That depends on the kind of reportings or analyzis you want to perform:

$options = ['id' = $myid];

Reporting/Displaying the stored information

Once you have started to count the page hits, different sort of reports can be displayed. For example, a very basic report is the number of hits per page stored on the database:

$data = SiteAnalyzer::getStats();
print( SiteAnalyzer::transform($data, "html") );