Hi there,
I want to confirm if this is still today the way to do it: (Is there any update)
Thanks for writing in! First of all, make sure that you have setup a child theme correctly and activate it by following our guide here (https://theme.co/apex/forum/t/setup-how-to-setup-child-themes/572).
Then you will see that there are two parts, which you will need to implement accordingly.
A code for of your site
Code immediately after the opening tag
To implement the head part, you can add the following code into your child theme’s functions.php file and replace the following line
with the code that you have received from Google.
function my_tag_manager_code_head() { ?>
<?php } add_action( 'wp_head', 'my_tag_manager_code_head' ); Then to implement body tag part, follow the instructions below. Create file base.php in wp-content/themes/pro-child/framework/views/header/ and replace the following line with the body code provided by Google. <?php // ============================================================================= // VIEWS/HEADER/BASE.PHP // ----------------------------------------------------------------------------- // Declares the DOCTYPE for the site, includes the , opens the // element as well as the .x-root<?php do_action( 'x_before_site_begin' ); ?>
Add your goolge tag manager code after this line