Integrating the Google Tag Manager code into WordPress
1. Open your Google Tag Manager account and access the ‘Admin’ tab > ‘Account’ > ‘Install Google Tag Manager’.
2. A new window will appear. It contains the GTM code that must be installed.
3. In a different window, go to your WordPress Dashboard, ‘Appearance’, ‘Editor’, and look for the ‘header.php‘ template. The GTM code must be inserted here. The GTM code has 2 parts that need to be inserted as follows: the 1st has to be added within the <head> tag; the 2nd part of the GTM code has to inserted within the <body> tag. In the end, after placing both snippets of code, press ‘Update File’.
If you have additional questions or inquiries regarding GTM implementation, you can access this Quick Start Guide.