Advanced User Analytics Tracking

A cPanel/WHM server does not by default track deep analytics on user activity, however it is possible to use a third party tool like Google Analytics (Web-based Third Party) or Matomo (a private application available in Installatron) to get greater insight into visitors and users of your Domain of One’s Own system. To do this you will need to add third party scripts to two separate locations.

Domain of One’s Own WordPress Portal

Your branded WordPress install where users signup and login to access cPanel is the first place to add tracking code. Both Google Analytics and Matomo have WordPress plugins to make this process easier (For Google Analytics the MonsterInsights plugin is very popular, for Matomo use the WP-Matomo plugin). The plugins allow you to enter specific information about your GA or Matomo account to start tracking user statistics. We feel strongly that tracking should require consent and you should make users aware of the adoption of these tracking tools when they use your service.

Analytics tools tracking the portal can give you insight into what location users are accessing the portal, the operating system, devices, and browsers they use, and how long they are staying there. Information on the /dashboard page will be of particular use given that is the page that users access cPanel from.

cPanel

Because cPanel is embedded in an iframe in your portal, it is not enough to add tracking code the portal, otherwise no activity from within cPanel will be logged. By adding tracking code to the footer of cPanel you can also gain insight into which areas of cPanel users are accessing. This is done via includes, small text files on the server that dynamically add additional content to the cPanel theme.

Create the folder /var/cpanel/customizations/includes/ and add the file global_footer.html.tt to it.Within this folder you can paste any javascript code you want to be included in the cpanel theme automatically. Google Analytics will provide this tracking code to you directly and usually it will start and end with <script></script> tags.