Fathom Analytics works great with Drupal.
Here is a plugin created by the Drupal community to work with Fathom. Alternatively, you can just add our embed script to the header of your template in Drupal.
Note: we do not maintain this plugin, nor is it an official plugin created by Fathom.
To learn about all the options we offer, read our advanced documentation here.