You don’t have to use any plugins at all.
The whole process will take you around 5 minutes.
If you don’t know where to get your Google Tag Manager code, please, visit this page.
Armed with your code, go to your console in WordPress admin panel.
In the menu on the left, choose Appearance and in the drop-down menu select Editor.
Choose Header in the right list. If you have several headers you will have to edit each one of those.
Find the opening body tag and put your code right after it. Save changes!
How to check that your implementation works correctly?
Go to the destination page of your site and press ctrl-U on your keyboard.
Then press ctrl-F and input “Google Tag Manager”. If everything’s alright you should see your code right after the opening body tag. Remember, that this tag has to be on your every page including 404 and even those you don’t include into index. To avoid looking manually through all the pages, just install a Tag Assistant extenstion. It was created by Google to check if your tag manager and all that it includes does work properly.