Adding google tag manager without plugin
-
How can i add google tag manager, without adding any plugin.
There used to be a file editor, but i am not able to see that option on the theme to direct edit the header.php file.
pls help
Hello,
The easiest approach is to add the Google Tag Manager code using a lightweight plugin such as Insert Headers and Footers. This allows you to add the tracking code without modifying any theme files.
If you prefer not to use a plugin, you should not edit the parent theme files directly, as your changes will be lost after a theme update. Instead, copy the header.php file from the parent theme to your child theme and then add the Google Tag Manager code there.
Also, Please follow this article to insert GTM to your site without using plugin https://googleanalytics4.co/google-tag-manager/adding-google-tag-manager-to-wordpress-without-plugin/
Best Regards,