Advertisement

no Index.html or </body> to add external code

Need help with the Administration of your Joomla! 5.x site? This is the spot for you.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10
Post Reply
jameZzzz
Joomla! Apprentice
Joomla! Apprentice
Posts: 20
Joined: Tue Jun 21, 2022 2:25 am

no Index.html or </body> to add external code

Post by jameZzzz » Mon Feb 17, 2025 5:01 pm

someone wants to add some hit tracking code for a 5.3.2 website
I cant see where to add the code normally it goes before the </body>

<!-- Place patronQR™ Connect Code after <body> and before </body> -->
<script type="text/javascript" src="https://patronQR.com/connect/main.js"></script>
<patronqr-connect id="27357" color="#3880ff" position="right"></patronqr-connect>
<!-- End of patronQR™ Connect Code -->


all I see is the index.php now

can anyone help on this

Advertisement
User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 44981
Joined: Sat Apr 05, 2008 9:58 pm

Re: no Index.html or </body> to add external code

Post by Webdongle » Mon Feb 17, 2025 6:18 pm

Put it in a custom module and set the position to a non existent one.
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 31660
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: no Index.html or </body> to add external code

Post by Per Yngve Berg » Mon Feb 17, 2025 6:35 pm

You can put it in the index.php of the Template or write a Plugin.

User avatar
AMurray
Joomla! Master
Joomla! Master
Posts: 10558
Joined: Sat Feb 13, 2010 7:35 am
Location: Australia

Re: no Index.html or </body> to add external code

Post by AMurray » Mon Feb 17, 2025 9:42 pm

There are many extensions that allow inserting of custom code such as https://extensions.joomla.org/extension ... sert-code/ and more, found here https://extensions.joomla.org/tags/custom-code-in-head/
Regards - A Murray
Global Support Moderator

jameZzzz
Joomla! Apprentice
Joomla! Apprentice
Posts: 20
Joined: Tue Jun 21, 2022 2:25 am

Re: no Index.html or </body> to add external code

Post by jameZzzz » Tue Feb 18, 2025 6:21 pm

I tried to make a custom module with the code but nothing works yet

jameZzzz
Joomla! Apprentice
Joomla! Apprentice
Posts: 20
Joined: Tue Jun 21, 2022 2:25 am

Re: no Index.html or </body> to add external code

Post by jameZzzz » Tue Feb 18, 2025 6:22 pm

i tried to paste the code into the index.php
caused a error

User avatar
AMurray
Joomla! Master
Joomla! Master
Posts: 10558
Joined: Sat Feb 13, 2010 7:35 am
Location: Australia

Re: no Index.html or </body> to add external code

Post by AMurray » Tue Feb 18, 2025 9:39 pm

What error? Please be specific with the information you're giving.

Perhaps the error is in the code you're trying to paste, and not with Joomla.
Regards - A Murray
Global Support Moderator

Advertisement

Post Reply

Return to “Administration Joomla! 5.x”