How to integrate google tag manager and Facebook pixel with erp website?

Hello everyone,
I want to integrate my google tag manager or Facebook pixel with the ERP website.
Issue:
when I add the pixel code on the ERP website header section it shows the error and does not track the visitors.

And google tag manager need to add code in the header and body tag. but i don’t know where is the body tag.