PVY Posted December 7, 2017 Share Posted December 7, 2017 Hi, I'm using google analytics tracking code for the submit ticket and I need it to paste in the <body> tag. Where can I locate the core file? Link to comment Share on other sites More sharing options...
sentq Posted December 7, 2017 Share Posted December 7, 2017 only template files are editable, and they located under "/templates/{Your-Template-Name}/" directory. but you don't need to edit any template file for what you ask here, you could simply write a function (ActionHook) to check in what page your clients are and apply the whatever you need. <?php add_hook("ClientAreaFooterOutput", 1, function($vars){ // Check if current page are submitticket.php if ($vars['filename'] == "submitticket"){ // Add your tracking code here $javascriptCode = '<script type="text/javascript">alert("You\'re about to submit a ticket :)");</script>'; return $javascriptCode; } }); create new php file (e.g.: googleTrackingCode.php) inside /includes/hooks/ directory and copy the example code above to it, test it then put your tracking code, that's it 1 Link to comment Share on other sites More sharing options...
WHMCS Marcus Posted December 7, 2017 Share Posted December 7, 2017 What @sentq mentioned will work well in your situation. Additionally, I'd like to point out that WHMCS does offer an Analytics Module as part of the system already, with documentation found here: https://docs.whmcs.com/Google_Analytics Link to comment Share on other sites More sharing options...
Recommended Posts