Sometimes, adding Google Analytics to WHMCS template would break the template and cause issues. The best way to add tracking code is from the WHMCS administrative backend.
- Log into your WHMCS backend
- Go to Setup and Choose Addon Modules
- Activate Google Analytics
- Go into your Google Analytics account and take your Tracking ID. This can be done by clicking on the Admin tab and choosing the Property Settings. You can see the Tracking ID here.
- Copy the Tracking ID and paste it into your WHMCS and choose Universal Code as this provides a larger user data.
- Save and close. You are now all set to receive user data in your Google Analytics account.