For GTM installation, I’m adding the head snippet via the functions file in my child theme. That works wells.
However, for the other GTM snippet, it should go immediately after the tag. I tried adding the code via functions file to be included x_before_site_begin but it places the code after another opening div. It seems that GTM won’t reconize the placement of the body snippet unless it is immediately after the tag.
To get around this, I’m modifying base.php in my child theme.
My question - is this still the best way to do it, or is there a better method? I’m a little concerned using base.php inside the child theme.
