Install ruby-rack-google-analytics by entering the following commands in the terminal:
sudo apt update sudo apt install ruby-rack-google-analytics
Description:
Simple Rack middleware to inject the Google Analytics tracking code
This middleware injects either the synchronous or asynchronous Google Analytics tracking code into the correct place of any request only when the response's `Content-Type` header contains `html` (therefore `text/html` and similar).
Homepage: https://github.com/leehambley/rack-google-analytics
Version: 1.2.0-1
Section: universe/ruby