How to place Google Tag Manager code within <body> tag?

Hi,

We have successfully placed ‘Google Tag Manager’ code within < head> tag. Can anyone please guide us how to place ‘Google Tag Manager’ code within < body> tag?

Thanks & Regards,
@skghosh

Hi @skghosh

Do you need to insert custom HTML or Javascript code (or something else?)
Also, what OJS version are you using?

Hello @Vitaliy , This is a Javascript code and the OJS version is 2.4.2.0.

If you want to inject a script tag within the body, it is probably going to be outputting HTML for display. Otherwise, you could just inject it into the head as well. If you want it to display somewhere, where exactly do you want it to appear. OJS 2.x supports numerous template hooks which can be used to target specific elements. Another common use case is to place code in a block, and then place the block within the sidebar.

@ctgraham @Vitaliy

The Google Tag Manager needs to insert two codes one is above the header and one is below the body tag.

Install Google Tag Manager
Copy the code below and paste it onto every page of your website.
Paste this code as high in the **<head>** of the page as possible:

<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'----------------Removed------------'</script>
<!-- End Google Tag Manager -->

Additionally, paste this code immediately after the opening **<body>** tag:

<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="'----------------Removed------------'"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->

It is required to insert both codes to run Google Tag Manager properly. I successfully placed 1st code help of Custom Header Plugin. Please help with the second code.
I am using: OJS 3.3.0.6