Why do you need Docker for a simple PHP & MySQL script? To install it you just need to setup a MySQL database and enter the credentials in the setup script. Finally, add the tracking code to your site, but that's the same for every analytics engine.
And you also need to set up a bunch of things in your web server, add the cron jobs, run the update script and hope everything still works afterwards etc.