Analítica

How to install Google Tag Manager on WordPress

In this post I will explain how to install Google Tag Manager in WordPress and I will show you the best options to do it in a simple way and without knowing anything about code. If you already know a bit about the topic I recommend you to look for our favourite option because in less than 10 minutes you can have Google Tag Manager working in your WordPress.

7 min lectura

TL;DR · resumen ejecutivo

¿Qué vas a encontrar en este artículo?

Google Tag Manager (GTM) is a powerful tool that many businesses are currently using to drive their productivity. But what exactly is Google Tag Manager, and how can it benefit your business? At Cronuts Digital, we delve into the fundamentals of GTM, its features, benefits, and best practices for effective implementation. Let’s start!...

Google Tag Manager (GTM) is a powerful tool that many businesses are currently using to drive their productivity. But what exactly is Google Tag Manager, and how can it benefit your business? At Cronuts Digital, we delve into the fundamentals of GTM, its features, benefits, and best practices for effective implementation. Let’s start!

 

What is Google Tag Manager?

Website owners frequently need to integrate various scripts and code snippets to track conversions, analyze traffic, and gather digital analytics data. Managing these multiple scripts can be cumbersome and time-consuming.

Google Tag Manager simplifies this process by allowing you to add and manage all your tracking codes from a single, user-friendly dashboard. Instead of modifying your website’s code directly for each tag, you can use GTM to handle everything centrally.

Moreover, Google Tag Manager supports custom HTML, enabling you to incorporate additional tracking code or other custom scripts seamlessly. This functionality provides even greater flexibility in tracking and managing your digital data.

By consolidating all your tags through GTM, you save significant time and effort. All scripts integrated via Tag Manager are combined into a single script, which not only optimizes resource use but also enhances your website’s loading speed.

How to install Google Tag Manager on WordPress

To begin, visit the Google Tag Manager website and sign up with the Google account you use for Google Analytics. After logging in, you’ll be taken to the dashboard, where you can view all your active accounts. Click “Add New Account,” enter a name for your account, and press “Continue.” Next, create a container within your account by selecting the web option for a website. Use your website’s domain name for the container name and then click “Create.”

Once your account and container are established, Google Tag Manager will generate a code snippet. This code needs to be integrated into your WordPress site to complete the setup. By doing so, you’ll be able to manage and deploy tags efficiently from a centralized dashboard.

Adding the code in WordPress

Manual installation 

Google Tag Manager specifies that its code should be placed immediately after the opening <body> tag, which is typically found in the header.php file of your WordPress theme. To locate and edit this file, navigate to your WordPress dashboard, select “Appearance” from the menu, and then click on “Theme Editor.” Alternatively, you can access the file via your server’s FTP. On the right side of the editor, you’ll find the list of theme files; select header.php for editing.

It’s crucial to use a Child theme for this modification to avoid losing your tracking code during theme updates. Once you locate the <body> tag in the header.php file, paste the Google Tag Manager code immediately after it. Click “Update File” to save your changes. Additionally, always back up your WordPress files before making any changes to ensure you can restore them if something goes wrong.

Installation with plugins

For those who don’t feel so comfortable touching the wordpress code, in the wordpress plugin directory you will find several options:

1- Insert Headers and Footers:

With this plugin we can add any type of script in the header or footer of WordPress. So if we choose this option we only have to paste the tag manager tracking code in the head part.

wordpress headers and footers

 

2- Google Tag Manager for WordPress (our favourite option):

This is an exclusive plugin for tag manager integration with wordpress and offers a large number of functions. It is the easiest integration of all.

google tag manager for wordpress

To install Google Tag Manager on your WordPress you only need to download the plugin from the repository, go to the settings and select the option “Injection without code” once selected you must enter your Google Tag Manager ID in the corresponding field and save the changes.

configurar google tag manager for wordpress

It’s as simple as that!

Verify that Tag Manager is properly installed

How can we know if Google Tag Manager is properly installed? For this we are going to use the Tag Assistant extension for Google Chrome. By simply installing this add-on in your browser you will be able to see which scripts are active on any website you visit.

Once installed, go to your website, click on the Tag Assistant icon and check that your tag manager tag is shown in green.

google tag assistant

Examples of its use

1. E-Commerce retailer: “Shopify Store”

Challenge: Shopify Store needed a more efficient way to manage various tracking and marketing tags on their e-commerce site. They were struggling with manually implementing and updating tags, which was time-consuming and prone to errors.

Solution: by integrating Google Tag Manager, Shopify Store consolidated all their tracking scripts into one platform. They set up tags for Google Analytics, Google Ads, Facebook Pixel, and other marketing tools within GTM.

Success:

  • Improved efficiency: the streamlined tag management reduced the time spent on updating and troubleshooting tracking codes.
  • Enhanced tracking accuracy: the unified tagging system improved data accuracy, leading to more reliable insights into customer behavior and campaign performance.
  • Optimized marketing efforts: with better tracking, Shopify Store could fine-tune their ad campaigns, resulting in increased conversion rates and higher ROI.

 

2. Media company: “TechNews Weekly”

Challenge: TechNews Weekly needed to manage multiple marketing and analytics tools to track user engagement across their website and app. They faced challenges in deploying and managing these tools efficiently.

Solution: the media company implemented Google Tag Manager to handle all their tags, including those for Google Analytics, AdSense, and various third-party tools. They used GTM’s built-in triggers and variables to customize their tracking.

Success:

  • Unified data collection: GTM provided a centralized dashboard for managing and deploying tags, making it easier to oversee and adjust tracking.
  • Increased flexibility: the media company was able to quickly deploy and test new tags and tracking configurations without needing developer support.
  • Enhanced user insights: with comprehensive tracking in place, TechNews Weekly gained deeper insights into user interactions and engagement, allowing them to optimize content and advertising strategies.

3. Travel agency: “Wanderlust Journeys”

Challenge: Wanderlust Journeys wanted to track conversions from various marketing channels and understand customer journey better. They struggled with integrating multiple analytics and tracking tools.

Solution: they adopted Google Tag Manager to integrate Google Analytics, Google Ads, and conversion tracking tools into their site. GTM allowed them to set up detailed conversion tracking and event tracking for specific actions like booking flights and tours.

Success:

  • Detailed conversion tracking: GTM’s event tracking enabled Wanderlust Journeys to capture detailed data on user actions, providing insights into the effectiveness of their marketing efforts.
  • Optimized ad spend: with accurate conversion tracking, the travel agency was able to allocate their ad budget more effectively, leading to better campaign performance and reduced cost per acquisition.
  • Improved customer insights: the enhanced tracking capabilities offered deeper insights into customer behavior, helping the agency tailor their offerings and marketing strategies to better meet customer needs.

4. Non-profit organization: “Green Planet Initiative”

Challenge: Green Planet Initiative needed to track donations, sign-ups, and engagement with their online campaigns but lacked a streamlined method for managing multiple tracking codes.

Solution: they implemented Google Tag Manager to manage all their tracking needs. GTM helped integrate Google Analytics for monitoring website traffic, conversion tracking for donations, and tags for various fundraising tools.

Success:

  • Efficient tag management: GTM simplified the process of managing and updating tags, allowing the non-profit to focus more on their mission rather than technical issues.
  • Enhanced fundraising insights: the detailed tracking provided valuable data on donor behavior and campaign effectiveness, leading to more informed fundraising strategies.
  • Increased campaign effectiveness: by analyzing the data from GTM, Green Planet Initiative was able to optimize their campaigns, resulting in higher engagement and increased donations.

 

El mercado global de desarrollo web alcanzó los 55.270 millones de dólares en 2025, impulsado por la demanda de experiencias digitales personalizadas (Fortune Business Insights, 2025). — Fuente: Fortune Business Insights, 2025

The perfect solution

Installing Google tag Manager in your WordPress is the best solution to have all the scripts of the tools you use in one place. It also allows you to configure in detail the measurement of all your conversion goals in a very simple way. It is essential that you learn little by little how Google Tag Manager works and how to take advantage of it. While it is true that most people use it only to install tags, it also has much more advanced functions with a lot of potential.

At Cronuts Digital, we understand that Google Tag Manager (GTM) is a powerful platform that can significantly enhance your digital marketing and analytics efforts. By mastering GTM, you can streamline your tag management, gain deeper insights into your data, and implement sophisticated tracking strategies with ease. Are you ready to start using it?

 

Preguntas frecuentes

Lo que CMOs y directores nos preguntan.

8 dudas concretas con respuesta accionable en ≤ 80 palabras · formato óptimo para AI Overviews.

¿Qué son los Core Web Vitals y por qué son críticos en 2026?
Core Web Vitals son 3 métricas de Google que miden la experiencia real del usuario: LCP (velocidad de carga del contenido principal), INP (latencia de interacciones) y CLS (estabilidad visual del layout). Desde 2024 son factor de ranking directo en SEO y criterio de citación en motores IA.
¿Cómo mido LCP, INP y CLS con datos reales?
Usa Google Search Console → Core Web Vitals para field data agregado. Complementa con PageSpeed Insights (lab + field) y Chrome DevTools Performance panel para debug granular. GA4 también tiene el evento web-vitals desde 2024.
¿Qué valores son suficientes para rankear en Google?
Google marca como "Good" thresholds específicos: LCP ≤ 2,5 s, INP ≤ 200 ms, CLS ≤ 0,1. En cronuts apuntamos a LCP < 1,2 s, INP < 100 ms y CLS < 0,05 — rangos de clase premium que marcan diferencia competitiva.
¿Cuánto cuesta optimizar Core Web Vitals de una web WordPress?
Depende del punto de partida. Desde 2.400 € en un sprint de 4 semanas para optimización quirúrgica en WordPress con Gutenberg o custom theme. Si hay plugins pesados o theme builders tipo Elementor, puede requerir migración técnica (8-15 K€).
¿INP reemplazó definitivamente a FID?
Sí. Google sustituyó FID por INP en marzo de 2024. INP mide toda la interacción (desde click hasta paint), no solo el primer delay. Si tu web supera FID pero falla INP, aún así penaliza ranking y GEO citability.
¿Core Web Vitals afectan al ranking de AI Overviews?
Indirectamente, sí. Google AI Overviews y Perplexity priorizan páginas con buena autoridad técnica. Webs con CWV malos tienen menos probabilidad de ser citadas. Es parte del checklist GEO de cronuts junto con schema, autoridad y llms.txt.
¿Qué plugins de WordPress ayudan con CWV sin romper nada?
WP Rocket (cache + lazy load + critical CSS), Imagify o ShortPixel (AVIF/WebP), Perfmatters (control granular scripts). Evita plugins all-in-one tipo Jetpack — lentos y bloqueantes. Para tema custom, WP Rocket es suficiente.
¿Puedo auditar mi web gratis con cronuts?
Sí. En 7 días auditamos tus Core Web Vitals actuales, identificamos los 3-5 cuellos de botella críticos y te enviamos un documento ejecutivo con hoja de ruta. Si no hay palanca de mejora real > 30%, te lo decimos antes de firmar. Solicitar diagnóstico.

Del artículo al pipeline

¿Quieres aplicar esto a tu web concreta?

Diagnóstico gratuito de 7 días con métricas reales de tu site. Si no hay palanca superior al 30%, te lo decimos antes de firmar. Brutalmente honesto.