Yes, we can add code in the body or head tags on selected pages and languages.
May I know the hook name to add the code? I can easily add-hook from the module and add custom code to hook in the front office.
Prestashop documentation will help to know list hooks and their work.