Jump to content

Submitticket.php. How to add script on the main <body> tag?

Recommended Posts


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?

Share this post

Link to post
Share on other sites

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.


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

  • Thanks 1

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.


Important Information

By using this site, you agree to our Terms of Use & Guidelines