wordpressgoogle-tag-manager

Wordpress add Google tag manager script to header.php


The Google tag manager requires me to put one script inside the "head" tag and one at the beginning of the "body" tag.

I want to know what would be considered "best practise" to achieve this. Are there any other ways than to create a child theme and place the Script in the header.php file?


Solution

  • You can use "Insert Headers and Footers by WPBeginner" plugin

    https://wordpress.org/plugins/insert-headers-and-footers/