Hi,
I am trying to add Google Tag Manager tags to my site, I’ve successfully added other tracking codes and functions to the head in the past using add_action hooks to the child theme functions.php file. But, Google Tag Manager requires you to add an additional tag into the body and I haven’t been able to make this work. I have tried to use the x_after_body_begin and x_before_site_begin to do this (as suggested by other threads on this topic) and neither have worked for me.
I found this thread (https://theme.co/apex/forum/t/google-tag-manager-issues/450/5) that talked about copying the x/framework/legacy/cranium/headers/views/global/_header.php into x-child/framework/legacy/cranium/headers/views/global/_header.php, then adding the code from there. But I don’t have a /legacy/cranium/headers/views/global/_header.php file in my child theme folder and I don’t know how to create this.
I have also tried using a third party plugin and that also did not work,
Any advice would be appreciated, thought this would be relatively straightforward but have wasted hours on this.