0

Have a new website and want to install Google Tag Manager (GTM). The GTM code requires a (second) tag. According to this site (https://www.wpexplorer.com/google-tag-manager-wordpress/) you can copy files from the main theme to the child theme. "Google Tag Manager installation codes into the header.php file."

However, my concern is that it will break the site. We first made child theme (with only styles.css and functions.php) and then designed the website.

Or is there another way to install the second GTM tag to the site?

1 Answer 1

0

If you copy the header.php file from the parent theme to the child theme it should work fine. Normally, child theme files take priority over parent theme files. If for any reason it causes a problem, remove the file and the website should go back to normal.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.