Jump to content

Best way to insert code.

Featured Replies

Posted

Hello, I need insert code, the instructions are:

Quote

The code must be placed before closing </body> tag.

What is the best way to insert that code?

  • Author

Thank you @Edward Shephard 

I think that For this simple thing it´s no necessary to use the developer mode.

I thought I could create a template custom.html in the acp (same as when we create custom.css)  but  I do not know how.

Hello,

<body> tag located in globalTemplate template

You can also use the setting "Custom tracking code"

  • Author
8 minutes ago, newbie LAC said:

You can also use the setting "Custom tracking code"

I only find "Google Analytics Tracking Code". Can I put the code after Analytics Code?

 

A custom template wouldn't help you much because unless you then use a hook to add the template you would still have to manually edit the global template each time you update the site. Newbie's idea sounds good but I've never tried it.

5 minutes ago, pequeno said:

I only find "Google Analytics Tracking Code". Can I put the code after Analytics Code?

Click on Other for "Analytics provider".

  • Author
2 minutes ago, Edward Shephard said:

Newbie's idea sounds good but I've never tried it

Yes, I tested it but my question is If when I save the custom code the system keep the Analytics code.

Don't know, I would try it and see.  If you are inserting javascript then you should be able to see it by looking at the final page source in your browser.

Archived

This topic is now archived and is closed to further replies.

Recently Browsing 0

  • No registered users viewing this page.