Add script before closing body

business

Member
Hi,

I want to use some 3rd party scripts before the body tag closing so those could load on each page.

I tried adding scripts to footer_install.php as well as header_install.php but those script does not load.

When I edit the header.php or footer.php and add scripts there, these work fine.

Can you tell me the right way how to add 3rd party scripts (such as tracking, or firewall etc.)?

Thanks
 

eugenio

Administrator
Staff member
Hi,
you can edit header.php and footer.php but you can also (better solution) use the layout hooks, using PHP echo statement to print out your scripts: in particular custom_footer_2 is the closest to the </body> tag (there is another script after, as you can see from the code).

Best,
 

eugenio

Administrator
Staff member
The hooks are triggered in any page of the application, they are not triggered in the login page and in the admin section.

Best,
 
Top