I need help to paste google tag manager code "additionally, paste this code immediately after the opening <body> tag:" can someone help me to do this?

i need help to paste google tag manager code “additionally, paste this code immediately after the opening tag:” can someone help me to do this?

1 Like

Hello Richard,

Thanks for writing in! Because what you are trying to accomplish requires a template customization, we would highly to suggest that you use a child theme. This allows you to make code changes that won’t be overwritten when an X update is released. After your child theme is setup, please review how we recommend making template changes in Customization Best Practices.

After the child theme is set up, please add the following code in your child theme’s functions.php file

// Add Google Tag Manager Code
// =============================================================================
function add_google_tag_manager_code(){
?>

<!-- Insert Google Tage Code Here -->


<!-- Insert Google Tage Code Here -->

<?php 
}
add_action( 'x_after_body_begin', 'add_google_tag_manager_code' );
// End Add Google Tag Manager Code
// =============================================================================

And for other alternative, please check out this thread:

Hope this helps.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.