Add Google Tag Manager code to WHMCS

There are quite a few paid plugins that do a few simple things which can be done for free.

header.tpl

The first step is to add your Google Tag Manager header code to the header.tpl file of your template. The path for the header.tpl file should be as follows:

/your-whmcs-path/templates/template-name/includes/header.tpl

The code should be pasted as follows:

{literal}

Google Tag Manager head code

{/literal}

footer.tpl

The next step is to add your Google Tag Manager body code to the footer.tpl file of your template. The path for the footer.tpl file should be as follows:

/your-whmcs-path/templates/template-name/includes/footer.tpl

The code should be pasted as follows:

{literal}

Google Tag Manager body code

{/literal}

And there you have it, you’ve successfully added Google Tag Manager code to your WHMCS.