Insert Tag Manager tags

Hi, I want to link Google Tag Manager with my OJS site to handle different integrations using the tool: pixel, GA4, etc.
Now, the directions are to paste a code in the <head> and another in <body>.
I try to place the code in lib/pkp/templates/frontend/components/headerHead.tpl but the site stops working. The same happens when placing it in header.tpl.
I tried using the custom header plugin but it didn’t work.
Where and how can I add the code snippets?

Thanks.

My OJS is 3.3.0.11

Hi, @asmecher Can you guide me where to place the labels? Thank you.

Hi @Ppantaleo ,

You could use a child theme to implement those tags and overriding templates. Please, see the documentation about child themes for OJS:
https://docs.pkp.sfu.ca/pkp-theming-guide/en/child-themes.html#overriding-templates

Best,
Israel

Thanks @israel.cefrin