Add Google Tag Manager to your WordPress site with SEOPress

Since SEOPress 3.6.2, you can now add Google Tag Manager tracking code to your site with user consent (if needed) in a minute.

From Google Tag Manager website, Admin, Setup Google Tag Manager, copy the first code (head) using the icon on the right.

Then, go to your WordPress admin, SEO, Google Analytics, Tracking tab, and paste your code into the field “[HEAD] Add an additional tracking code (like GTM, Facebook Pixel, Hotjar…)“.

Go back to GTM, copy the second part (body) and paste it into the field “[BODY] Add an additional tracking code (like Google Tag Manager…)“.

Save changes.

Clear your cache if you have one.

Done!

If you don’t see the second part of the code just after the opening of the body tag, update your theme or manually add this code:

<?php wp_body_open(); ?>

Paste it after the opening body tag.

You can also use the user consent feature from SEO > Google Analytics > General tab with GTM or any other script.

Last modified: August 15, 2019

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)
Loading...