SSH to your server and navigate to your Magento 2 installation folder.
Add the composer repository for the Metrilo Magento 2 plugin to your setup:
composer config repositories.metrilo-magento2 git "https://github.com/Metrilo/metrilo-magento2-integration.git"
Install the plugin:
composer require metrilo/analytics-magento2-extension
Now that the plugin is successfully installed run:
$ bin/magento setup:upgrade
Configure the plugin by going to "Store" > "Configuration" > "Metrilo" > click "Analytics".
You can take the credentials from the Settings/Installation page of your Metrilo project.
Clear any caches you might have to make sure that the metrilo code appears on all of your pages.
$ bin/magento cache:flush