{"id":6141,"date":"2018-07-11T06:23:05","date_gmt":"2018-07-11T06:23:05","guid":{"rendered":"https:\/\/www.geotelecom.es\/blog\/google-tag-manager-insercion-simple-codigo\/"},"modified":"2026-03-16T15:42:30","modified_gmt":"2026-03-16T15:42:30","slug":"google-tag-manager-simple-code-insertion","status":"publish","type":"post","link":"https:\/\/www.geotelecom.es\/en\/blog\/google-tag-manager-insercion-simple-codigo\/","title":{"rendered":"Google Tag Manager: How to simplify the insertion of code on your website"},"content":{"rendered":"<p style=\"text-align: justify\">In the digital world we live in, technological innovation is advancing so fast that conventional commerce has moved to digital commerce. If you have been one of the first to jump on the bandwagon and you have a <em>e-commerce<\/em> or are you familiar with the world of <strong>Web analytics<\/strong>, the <strong><em>marketing<\/em><\/strong> <strong>digital<\/strong> or the <strong>CRO<\/strong>, Google Analytics and Google Adwords are two of the most useful tools offered by Google to better manage your business and advertising campaigns.<\/p>\n<p style=\"text-align: justify\">With these two tools you can keep track of all the interactions on your Web site: number of visitors, duration of visits, number of forms sent, etc. But in order to use these tools, it goes without saying that a previous installation is required.<\/p>\n<p style=\"text-align: justify\">If you are not a programmer, you may be wondering. <strong>\u00abHow can I install <\/strong>these<strong> codes on my Web site?<\/strong><strong>\u00bb.<\/strong> If you don't want to depend on developers and don't want to get involved in technical aspects such as FTP servers, integrated development environments, manual modifications of templates and HTML files, or having to meticulously study the operation of your <em>workframe<\/em> and take the risk of modifying what you shouldn't every time you need to update or insert a <em>script<\/em>, Google Tag Manager is your best ally!<\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_85 counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Contents of the entry<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Contents\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #a09353;color:#a09353\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #a09353;color:#a09353\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewbox=\"0 0 24 24\" version=\"1.2\" baseprofile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.geotelecom.es\/en\/blog\/google-tag-manager-insercion-simple-codigo\/#%C2%BFQue_es_Google_Tag_Manager\" >What is Google Tag Manager?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.geotelecom.es\/en\/blog\/google-tag-manager-insercion-simple-codigo\/#%C2%BFCuales_son_las_ventajas_de_Google_Tag_Manager\" >What are the advantages of Google Tag Manager?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.geotelecom.es\/en\/blog\/google-tag-manager-insercion-simple-codigo\/#%C2%BFComo_puedo_instalar_Google_Tag_Manager_en_mi_sitio_Web\" >How can I install Google Tag Manager on my website?<\/a><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"%C2%BFQue_es_Google_Tag_Manager\"><\/span>What is Google Tag Manager?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p style=\"text-align: justify\">Google Tag Manager is a \u00a0<strong>Tag Management Systems<\/strong>\u00a0(TMS), i.e., a <strong>label management tool<\/strong> Google provides for the implementation of tracking tags and conversions on your website.<\/p>\n<p style=\"text-align: justify\">To be more clear, it is a container in which you can group and manage campaign tracking tags, code snippets or other scripts that you need to implement on your website. <strong>without<\/strong> have to <strong>manually modify the source code<\/strong>.<\/p>\n<p style=\"text-align: justify\">Interesting, isn't it? Well, there's more.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"%C2%BFCuales_son_las_ventajas_de_Google_Tag_Manager\"><\/span>What are the advantages of Google Tag Manager?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><img fetchpriority=\"high\" decoding=\"async\" class=\"noresize aligncenter wp-image-6134\" title=\"Google Tag Manager Logo\" src=\"https:\/\/www.geotelecom.es\/wp-content\/uploads\/2026\/03\/Google-Tag-Manager.png\" alt=\"Google Tag Manager Logo\" width=\"293\" height=\"171\" srcset=\"https:\/\/www.geotelecom.es\/wp-content\/uploads\/2026\/03\/Google-Tag-Manager.png 856w, https:\/\/www.geotelecom.es\/wp-content\/uploads\/2026\/03\/Google-Tag-Manager-300x175.png 300w, https:\/\/www.geotelecom.es\/wp-content\/uploads\/2026\/03\/Google-Tag-Manager-768x449.png 768w\" sizes=\"(max-width: 293px) 100vw, 293px\" \/><\/p>\n<p style=\"text-align: justify\">The main advantage of this label manager is the <strong>independence and autonomy<\/strong> that it offers with respect to the Web development department. But in addition to this great advantage, it offers many others:<\/p>\n<ul style=\"text-align: justify\">\n<li><strong>Centralized tag management and code cleanup<\/strong>While previously the tags were inserted one by one in the source code of the page, with the implementation of GTM you will only need to insert the container code and you will be able to manage all the tags from its interface.<\/li>\n<li><strong>Increased performance<\/strong>The <em>scritps<\/em> of the analysis tools we use will be loaded externally through the GTM's own tool on the server, without increasing the source code and, therefore, <strong>will slow down the loading speed<\/strong> This directly affects the user experience and SEO itself.<\/li>\n<li><strong>Easy integration<\/strong> with other Google tools.<\/li>\n<li><strong>Progressive migration: <\/strong>Installing GTM for tag management in your Web does not imply its exclusive use, that is, tags inserted in the conventional way can coexist with tags inserted through GTM without generating incompatibilities (WARNING! this applies as long as there is no duplication of codes, because if we insert Google Analytics in the conventional way and, later, we introduce a UA tag through GTM, it will collect the data in duplicate).<\/li>\n<li><strong>Easy testing and verification of tag operation:<\/strong> Since it has a <em>preview<\/em> in which we can check if the tags are activated on the desired page, before publishing them.<\/li>\n<li><strong>Version control: <\/strong>That is, if we modify our tags and make a mistake, we can always go back and recover the configuration of any version we have previously saved.<\/li>\n<\/ul>\n<p style=\"text-align: justify\"><img decoding=\"async\" class=\"noresize alignnone wp-image-6135\" src=\"https:\/\/www.geotelecom.es\/wp-content\/uploads\/2026\/03\/warning.png\" alt=\"Achtung\" width=\"17\" height=\"17\" srcset=\"https:\/\/www.geotelecom.es\/wp-content\/uploads\/2026\/03\/warning.png 256w, https:\/\/www.geotelecom.es\/wp-content\/uploads\/2026\/03\/warning-150x150.png 150w\" sizes=\"(max-width: 17px) 100vw, 17px\" \/>\u00a0 However, it must be taken into account that, although it is true that it offers independence from developers at a basic level, at more advanced levels, where you work with variables extracted from the Web itself, you will need the help of a programmer.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"%C2%BFComo_puedo_instalar_Google_Tag_Manager_en_mi_sitio_Web\"><\/span>How can I install Google Tag Manager on my website?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p style=\"text-align: justify\">If we have chosen to use this tool to manage the tags on our Web site, it is time to know how to install it. The installation process consists of the following <u>steps<\/u>:<\/p>\n<ol>\n<li style=\"text-align: justify\">Create an account on <a href=\"https:\/\/tagmanager.google.com\/\">Google Tag Manager<\/a> with your Google email.<\/li>\n<li>Create an account and a container for your Web site.\n<ol>\n<li style=\"text-align: justify\">From <strong>All accounts<\/strong>, click on <strong>New account <\/strong>and set the account name:<img decoding=\"async\" class=\"noresize wp-image-6136 aligncenter\" title=\"GTM account setup\" src=\"https:\/\/www.geotelecom.es\/wp-content\/uploads\/2026\/03\/GTM-configurar-cuenta.png\" alt=\"GTM account setup\" width=\"343\" height=\"226\" srcset=\"https:\/\/www.geotelecom.es\/wp-content\/uploads\/2026\/03\/GTM-configurar-cuenta.png 508w, https:\/\/www.geotelecom.es\/wp-content\/uploads\/2026\/03\/GTM-configurar-cuenta-300x198.png 300w\" sizes=\"(max-width: 343px) 100vw, 343px\" \/><\/li>\n<li style=\"text-align: justify\">It is convenient to use a descriptive name for the account, and, for the container configuration, the domain name and the type of device on which the container is to be applied. Generally, the option <strong>web type.<\/strong><strong><img loading=\"lazy\" decoding=\"async\" class=\"noresize aligncenter wp-image-6137\" title=\"GTM configure container\" src=\"https:\/\/www.geotelecom.es\/wp-content\/uploads\/2026\/03\/GTM-configurar-contenedor.png\" alt=\"GTM configure container\" width=\"434\" height=\"149\" srcset=\"https:\/\/www.geotelecom.es\/wp-content\/uploads\/2026\/03\/GTM-configurar-contenedor.png 643w, https:\/\/www.geotelecom.es\/wp-content\/uploads\/2026\/03\/GTM-configurar-contenedor-300x103.png 300w\" sizes=\"(max-width: 434px) 100vw, 434px\" \/><\/strong><\/li>\n<\/ol>\n<\/li>\n<li style=\"text-align: justify\">Two code snippets will be automatically generated and displayed in a pop-up window:<img loading=\"lazy\" decoding=\"async\" class=\"noresize aligncenter wp-image-6138\" title=\"GTM codes\" src=\"https:\/\/www.geotelecom.es\/wp-content\/uploads\/2026\/03\/GTM-codigos-1.png\" alt=\"GTM codes\" width=\"725\" height=\"345\" srcset=\"https:\/\/www.geotelecom.es\/wp-content\/uploads\/2026\/03\/GTM-codigos-1.png 878w, https:\/\/www.geotelecom.es\/wp-content\/uploads\/2026\/03\/GTM-codigos-1-300x143.png 300w, https:\/\/www.geotelecom.es\/wp-content\/uploads\/2026\/03\/GTM-codigos-1-768x366.png 768w\" sizes=\"(max-width: 725px) 100vw, 725px\" \/><\/li>\n<li style=\"text-align: justify\">We insert the code snippets in the appropriate places. To do this we can either contact the developer, or we can do the insertion ourselves. In the case of choosing the second option, we will open the file in which the HTML code is generated from the <em>header<\/em> of our Web (header.php of the theme that is being used in the case of using WordPress).<\/li>\n<\/ol>\n<p style=\"text-align: justify\">The first code snippet will be inserted just as high as possible before the closing tag &lt;\/head&gt;. Within the same document, we look for the opening tag of the &lt;body&gt; and insert the second code fragment right after it.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"noresize aligncenter wp-image-6139\" title=\"GTM code insertion in header\" src=\"https:\/\/www.geotelecom.es\/wp-content\/uploads\/2026\/03\/GTM-insercion-de-codigos-en-header.png\" alt=\"GTM code insertion in header\" width=\"732\" height=\"412\" srcset=\"https:\/\/www.geotelecom.es\/wp-content\/uploads\/2026\/03\/GTM-insercion-de-codigos-en-header.png 1152w, https:\/\/www.geotelecom.es\/wp-content\/uploads\/2026\/03\/GTM-insercion-de-codigos-en-header-300x169.png 300w, https:\/\/www.geotelecom.es\/wp-content\/uploads\/2026\/03\/GTM-insercion-de-codigos-en-header-1024x576.png 1024w, https:\/\/www.geotelecom.es\/wp-content\/uploads\/2026\/03\/GTM-insercion-de-codigos-en-header-768x432.png 768w\" sizes=\"(max-width: 732px) 100vw, 732px\" \/><\/p>\n<ol start=\"5\">\n<li style=\"text-align: justify\">Once the code has been inserted, we save the document and update the file on our FTP server (creating a backup copy to be able to revert changes if there are any errors).<\/li>\n<\/ol>\n<p style=\"text-align: justify\">NOTE: This will be the <strong>single manual gearbox<\/strong> that we should do <strong>about the source code<\/strong>.<\/p>\n<ol style=\"text-align: justify\" start=\"6\">\n<li>Once the GTM code is installed in your header.php file, we can check if it is working properly with the help of the <a href=\"https:\/\/chrome.google.com\/webstore\/detail\/tag-assistant-by-google\/kejbdjndbnbjgmefkgdddjlbokphdefk?hl=es-419\">Google Chrome Tag Assistant extension<\/a>.<\/li>\n<\/ol>\n<p style=\"text-align: justify\">If when you activate the extension and load the page it detects the GTM tag but displays it in yellow and returns error 404, don't be alarmed. It means that it is correctly installed but no version has been published to the container yet. As soon as you add a tag and publish the changes, everything will be working correctly and you will start seeing data in your AdWords and Analytics accounts.<\/p>\n<p style=\"text-align: justify\">If you managed to install GTM following our little guide and want to know how to insert the Google Analytics tracking code, there will be a post about it soon, so stay tuned to our blog and, if you have any questions, <a href=\"https:\/\/www.geotelecom.es\/en\/contactanos\/\">do not hesitate to contact us!<\/a><\/p>","protected":false},"excerpt":{"rendered":"<p>In the digital world in which we live, technological innovation is advancing so rapidly that conventional commerce has moved to digital commerce. If you have been one of the first to jump on the bandwagon and have an e-commerce or are familiar with the world of Web analytics, digital marketing or CRO, you will know that two of the most useful tools offered by Google to better manage your business and advertising campaigns are Google Analytics and Google Adwords. Through these two tools you can keep track of all the interactions on your website: number of visitors, duration of visits, number of forms submitted, etc. But to be able to use these tools, it goes without saying that a previous installation is required. If you are not a programmer, you may be wondering &laquo;How can I install these codes on my Web site? If you don&#039;t want to depend on developers and don&#039;t want to get involved in technical aspects such as FTP servers, integrated development environments, manual modifications of templates and HTML files, or having to meticulously study the operation of your workframe and take the risk of modifying what you shouldn&#039;t every time you need to update or insert a script, Google Tag Manager is your best ally! What is Google Tag Manager? Google Tag Manager is a Tag Management System (TMS), i.e. a free tag management tool that Google provides for the implementation of tracking tags and conversions on your website. To be clearer, it is a container in which you can group and manage campaign tracking tags, code snippets or other types of scripts that you need to implement on your website without having to manually modify the source code. Interesting, isn&#039;t it? Well, there&#039;s more. What are the advantages of Google Tag Manager? The main advantage of this tag manager is the independence and autonomy it offers with respect to the Web development department. But in addition to this great advantage, it offers many others: Centralized management of tags and code cleaning: While previously the tags were inserted one by one in the source code of the page, with the implementation of GTM you only need to insert the container code and you can manage all tags from its interface. Increased performance: The scritps of the analysis tools we use will be loaded externally through GTM&#039;s own tool on the server, without increasing the source code and, therefore, will slow down the loading speed of the Web -which directly affects the user experience and SEO itself. Easy integration with other Google tools. Progressive migration: Installing GTM for tag management on your Web does not imply its exclusive use, i.e., tags inserted in the conventional way can coexist with tags inserted through GTM without generating incompatibilities (WARNING! this applies as long as there is no duplication of codes, because if we insert Google Analytics in the conventional way and, later, we introduce a UA tag through GTM, it will collect the data in duplicate). Easy testing and verification of the operation of the tags: since it has a preview mode in which we can check if the tags are activated on the desired page, before publishing them. Version control: That is, if we modify our tags and make a mistake, we can always go back and recover the configuration of any version we have previously saved.   However, we must take into account that, although it is true that it offers independence from developers at a basic level, at more advanced levels, where we work with variables extracted from the Web itself, we will need the help of a programmer. How can I install Google Tag Manager on my Web site? If you have chosen to use this tool to manage tags on your website, it is time to find out how to install it. The installation process consists of the following steps: Create a Google Tag Manager account with your Google email. Create an account and a container for your website. From All accounts, click on New account and configure the account name: It is convenient to use a descriptive name for the account, and, for the container configuration, the domain name and the type of device on which you want to apply the container. Generally, the web type option is used. Two code snippets will be automatically generated and displayed in a pop-up window: We insert the code snippets in the relevant places. To do this we can either contact the developer or do the insertion ourselves. In the case of choosing the second option, we will open the file in which the HTML code of the header of our Web is generated (header.php of the theme that is being used in the case of using WordPress). The first code fragment will be inserted just as high as possible before the closing tag &lt;\/head&gt;. Within the same document, we look for the opening tag of the &lt;body&gt; and insert right after the second code fragment. Once the code is inserted, we save the document and update the file on our FTP server (creating a backup copy to be able to revert changes if there is any error). NOTE: This will be the only manual change we will have to make on the source code. Once the GTM code is installed in your header.php file, we can check if it works correctly with the help of the Google Chrome Tag Assistant extension. If when you activate the extension and load the page it detects the GTM tag but shows it in yellow and returns error 404, don&#039;t be alarmed. It means that it is correctly installed but no version has been published to the container yet. As soon as you add a tag and publish the changes, everything will be working correctly and you will start seeing data in your AdWords and Analytics accounts. If<\/p>","protected":false},"author":42,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[24],"tags":[],"class_list":["post-6141","post","type-post","status-publish","format-standard","hentry","category-herramientas"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Google Tag Manager: C\u00f3mo simplificar la inserci\u00f3n de c\u00f3digo en tu Web - Geotelecom<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.geotelecom.es\/en\/blog\/google-tag-manager-simple-code-insertion\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Google Tag Manager: C\u00f3mo simplificar la inserci\u00f3n de c\u00f3digo en tu Web - Geotelecom\" \/>\n<meta property=\"og:description\" content=\"En el mundo digital en el que vivimos, la innovaci\u00f3n tecnol\u00f3gica avanza tan vertiginosamente que el comercio convencional se ha trasladado al comercio digital. Si has sido uno de los primeros en subirte al carro y tienes un e-commerce o est\u00e1s familiarizado con el mundo de la anal\u00edtica Web, el marketing digital o el CRO, sabr\u00e1s que dos de las herramientas m\u00e1s \u00fatiles que ofrece Google para gestionar mejor tu negocio y campa\u00f1as publicitarias son Google Analytics y Google Adwords. A trav\u00e9s de estas dos herramientas puedes llevar un registro de todas las interacciones realizadas en tu Web: N\u00famero de visitantes, duraci\u00f3n de las visitas, cantidad de formularios enviados, etc. Pero para poder emplear estas herramientas, huelga decir que se precisa de una instalaci\u00f3n previa. Si no eres programador, te estar\u00e1s preguntando \u00ab\u00bfC\u00f3mo puedo instalar estos c\u00f3digos en mi sitio Web?\u00bb. Si no quieres depender de los desarrolladores ni adentrarte por tu propio pie en aspectos tan t\u00e9cnicos como servidores FTP, entornos de desarrollo integrado, modificaciones manuales de plantillas y archivos HTML o tener que estudiar meticulosamente el funcionamiento de tu workframe y asumir el riesgo que supone modificar lo que no debes cada vez que necesites actualizar o insertar un script, \u00a1Google Tag Manager es tu mejor aliado! \u00bfQu\u00e9 es Google Tag Manager? Google Tag Manager es un \u00a0Tag Management Systems\u00a0(TMS), es decir, una herramienta de gesti\u00f3n de etiquetas gratuita que Google facilita para la implementaci\u00f3n de etiquetas de seguimiento y conversiones en tu p\u00e1gina Web. Para ser m\u00e1s claros, se trata de un contenedor en el que se pueden agrupar y gestionar las etiquetas de seguimiento de campa\u00f1as, fragmentos de c\u00f3digo u otro tipo de scripts que necesites implementar en tu Web sin tener que modificar manualmente el c\u00f3digo fuente. Interesante, \u00bfverdad? Pues a\u00fan hay m\u00e1s. \u00bfCu\u00e1les son las ventajas de Google Tag Manager? La principal ventaja de este gestor de etiquetas es la independencia y autonom\u00eda que ofrece respecto al departamento de desarrollo Web. Pero adem\u00e1s de esta gran ventaja, ofrece muchas otras: Administraci\u00f3n centralizada de etiquetas y limpieza del c\u00f3digo: Si bien antes se insertaban las etiquetas una a una en el c\u00f3digo fuente de la p\u00e1gina, con la implementaci\u00f3n de GTM solo necesitar\u00e1s insertar el c\u00f3digo del contenedor y podr\u00e1s gestionar todas las etiquetas desde su interfaz. Aumento del rendimiento: Los scritps de las herramientas de an\u00e1lisis que usemos se cargar\u00e1n externamente a trav\u00e9s de la propia herramienta del propio GTM el servidor, sin incrementar el c\u00f3digo fuente y, por ende, disminuir\u00e1n la velocidad de carga de la Web \u2014Lo cual afecta directamente a la experiencia de usuario y al propio SEO. F\u00e1cil integraci\u00f3n con otras herramientas de Google. Migraci\u00f3n progresiva: Instalar GTM para la gesti\u00f3n de etiquetas en tu Web no implica su uso exclusivo, es decir, las etiquetas insertadas del modo convencional pueden convivir con las etiquetas insertadas a trav\u00e9s de GTM sin generar incompatibilidades (\u00a1OJO!, esto se aplica siempre y cuando no haya duplicidad de c\u00f3digos, ya que si insertamos Google Analytics del modo convencional y, posteriormente, introducimos una etiqueta UA a trav\u00e9s de GTM, recoger\u00e1 los datos por duplicado). F\u00e1cil testeo y comprobaci\u00f3n del funcionamiento de las tags: Ya que tiene un modo preview en el que podremos comprobar si las etiquetas se activan en la p\u00e1gina deseada, antes de publicarlas. Control de versiones: Es decir, si modificamos nuestras etiquetas y cometemos un error, siempre podemos volver atr\u00e1s y recuperar la configuraci\u00f3n de cualquier versi\u00f3n que hayamos guardado previamente. \u00a0 No obstante, hay que tener en cuenta que, si bien es cierto que ofrece independencia respecto de los desarrolladores a nivel b\u00e1sico, a niveles m\u00e1s avanzados, en los que se trabaja con variables extra\u00eddas de la propia Web, s\u00ed que se precisar\u00e1 ayuda de un programador. \u00bfC\u00f3mo puedo instalar Google Tag Manager en mi sitio Web? Si hemos optado por utilizar esta herramienta para gestionar las etiquetas en nuestro sitio Web, es hora de saber c\u00f3mo se instala. El proceso de instalaci\u00f3n se compone de los siguientes pasos: Crear una cuenta en Google Tag Manager con tu correo de Google. Crear una cuenta y un contenedor para tu sitio Web. Desde Todas las cuentas, pulsa sobre Nueva cuenta y configura el nombre de la cuenta: Conviene usar un nombre descriptivo para la cuenta, y, para la configuraci\u00f3n del contenedor, el nombre de dominio y el tipo de dispositivo en el cual se quiere aplicar el contenedor. Generalmente, se suele usar la opci\u00f3n tipo web. Autom\u00e1ticamente se generar\u00e1n dos fragmentos de c\u00f3digo que aparecer\u00e1n mostrados en una ventana emergente: Insertamos los fragmentos de c\u00f3digo en los lugares pertinentes. Para ello podemos, o bien contactar con el desarrollador, o bien realizar nosotros la inserci\u00f3n. En el caso de decantarnos por la segunda opci\u00f3n, abriremos el archivo en el cual se genere el c\u00f3digo HTML del header de nuestra Web (header.php del tema que se est\u00e9 empleando en el caso de usar WordPress). El primer fragmento de c\u00f3digo se insertar\u00e1 justo tan alto como sea posible antes de la etiqueta de cierre &lt;\/head&gt;. Dentro del mismo documento, buscamos la etiqueta de apertura de &lt;body&gt; e insertamos justo detr\u00e1s el segundo fragmento de c\u00f3digo. Una vez insertado el c\u00f3digo, guardamos el documento y actualizamos el archivo en nuestro servidor FTP (creaci\u00f3n de previa copia de seguridad para poder revertir cambios, si hubiera alg\u00fan error). NOTA: \u00c9ste ser\u00e1 el \u00fanico cambio manual que debamos hacer sobre el c\u00f3digo \u00a0fuente. Una vez instalado el c\u00f3digo de GTM en tu archivo header.php, podemos comprobar si funciona correctamente con la ayuda de la extensi\u00f3n Tag Assistant de Google Chrome. Si al activar la extensi\u00f3n y cargar la p\u00e1gina detecta la etiqueta de GTM pero la muestra en color amarillo y devuelve error 404, no te alarmes. Significa que est\u00e1 correctamente instalado pero a\u00fan no se ha publicado ninguna versi\u00f3n en el contenedor. En cuanto a\u00f1adas una etiqueta y publiques los cambios, todo estar\u00e1 funcionando correctamente y empezar\u00e1s a ver datos en tus cuentas de AdWords y Analytics. Si\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.geotelecom.es\/en\/blog\/google-tag-manager-simple-code-insertion\/\" \/>\n<meta property=\"og:site_name\" content=\"Geotelecom\" \/>\n<meta property=\"article:published_time\" content=\"2018-07-11T06:23:05+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-03-16T15:42:30+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.geotelecom.es\/wp-content\/uploads\/2026\/03\/Google-Tag-Manager.png\" \/>\n\t<meta property=\"og:image:width\" content=\"856\" \/>\n\t<meta property=\"og:image:height\" content=\"500\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Google Tag Manager: How to simplify the insertion of code in your Web - Geotelecom","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.geotelecom.es\/en\/blog\/google-tag-manager-simple-code-insertion\/","og_locale":"en_US","og_type":"article","og_title":"Google Tag Manager: C\u00f3mo simplificar la inserci\u00f3n de c\u00f3digo en tu Web - Geotelecom","og_description":"En el mundo digital en el que vivimos, la innovaci\u00f3n tecnol\u00f3gica avanza tan vertiginosamente que el comercio convencional se ha trasladado al comercio digital. Si has sido uno de los primeros en subirte al carro y tienes un e-commerce o est\u00e1s familiarizado con el mundo de la anal\u00edtica Web, el marketing digital o el CRO, sabr\u00e1s que dos de las herramientas m\u00e1s \u00fatiles que ofrece Google para gestionar mejor tu negocio y campa\u00f1as publicitarias son Google Analytics y Google Adwords. A trav\u00e9s de estas dos herramientas puedes llevar un registro de todas las interacciones realizadas en tu Web: N\u00famero de visitantes, duraci\u00f3n de las visitas, cantidad de formularios enviados, etc. Pero para poder emplear estas herramientas, huelga decir que se precisa de una instalaci\u00f3n previa. Si no eres programador, te estar\u00e1s preguntando \u00ab\u00bfC\u00f3mo puedo instalar estos c\u00f3digos en mi sitio Web?\u00bb. Si no quieres depender de los desarrolladores ni adentrarte por tu propio pie en aspectos tan t\u00e9cnicos como servidores FTP, entornos de desarrollo integrado, modificaciones manuales de plantillas y archivos HTML o tener que estudiar meticulosamente el funcionamiento de tu workframe y asumir el riesgo que supone modificar lo que no debes cada vez que necesites actualizar o insertar un script, \u00a1Google Tag Manager es tu mejor aliado! \u00bfQu\u00e9 es Google Tag Manager? Google Tag Manager es un \u00a0Tag Management Systems\u00a0(TMS), es decir, una herramienta de gesti\u00f3n de etiquetas gratuita que Google facilita para la implementaci\u00f3n de etiquetas de seguimiento y conversiones en tu p\u00e1gina Web. Para ser m\u00e1s claros, se trata de un contenedor en el que se pueden agrupar y gestionar las etiquetas de seguimiento de campa\u00f1as, fragmentos de c\u00f3digo u otro tipo de scripts que necesites implementar en tu Web sin tener que modificar manualmente el c\u00f3digo fuente. Interesante, \u00bfverdad? Pues a\u00fan hay m\u00e1s. \u00bfCu\u00e1les son las ventajas de Google Tag Manager? La principal ventaja de este gestor de etiquetas es la independencia y autonom\u00eda que ofrece respecto al departamento de desarrollo Web. Pero adem\u00e1s de esta gran ventaja, ofrece muchas otras: Administraci\u00f3n centralizada de etiquetas y limpieza del c\u00f3digo: Si bien antes se insertaban las etiquetas una a una en el c\u00f3digo fuente de la p\u00e1gina, con la implementaci\u00f3n de GTM solo necesitar\u00e1s insertar el c\u00f3digo del contenedor y podr\u00e1s gestionar todas las etiquetas desde su interfaz. Aumento del rendimiento: Los scritps de las herramientas de an\u00e1lisis que usemos se cargar\u00e1n externamente a trav\u00e9s de la propia herramienta del propio GTM el servidor, sin incrementar el c\u00f3digo fuente y, por ende, disminuir\u00e1n la velocidad de carga de la Web \u2014Lo cual afecta directamente a la experiencia de usuario y al propio SEO. F\u00e1cil integraci\u00f3n con otras herramientas de Google. Migraci\u00f3n progresiva: Instalar GTM para la gesti\u00f3n de etiquetas en tu Web no implica su uso exclusivo, es decir, las etiquetas insertadas del modo convencional pueden convivir con las etiquetas insertadas a trav\u00e9s de GTM sin generar incompatibilidades (\u00a1OJO!, esto se aplica siempre y cuando no haya duplicidad de c\u00f3digos, ya que si insertamos Google Analytics del modo convencional y, posteriormente, introducimos una etiqueta UA a trav\u00e9s de GTM, recoger\u00e1 los datos por duplicado). F\u00e1cil testeo y comprobaci\u00f3n del funcionamiento de las tags: Ya que tiene un modo preview en el que podremos comprobar si las etiquetas se activan en la p\u00e1gina deseada, antes de publicarlas. Control de versiones: Es decir, si modificamos nuestras etiquetas y cometemos un error, siempre podemos volver atr\u00e1s y recuperar la configuraci\u00f3n de cualquier versi\u00f3n que hayamos guardado previamente. \u00a0 No obstante, hay que tener en cuenta que, si bien es cierto que ofrece independencia respecto de los desarrolladores a nivel b\u00e1sico, a niveles m\u00e1s avanzados, en los que se trabaja con variables extra\u00eddas de la propia Web, s\u00ed que se precisar\u00e1 ayuda de un programador. \u00bfC\u00f3mo puedo instalar Google Tag Manager en mi sitio Web? Si hemos optado por utilizar esta herramienta para gestionar las etiquetas en nuestro sitio Web, es hora de saber c\u00f3mo se instala. El proceso de instalaci\u00f3n se compone de los siguientes pasos: Crear una cuenta en Google Tag Manager con tu correo de Google. Crear una cuenta y un contenedor para tu sitio Web. Desde Todas las cuentas, pulsa sobre Nueva cuenta y configura el nombre de la cuenta: Conviene usar un nombre descriptivo para la cuenta, y, para la configuraci\u00f3n del contenedor, el nombre de dominio y el tipo de dispositivo en el cual se quiere aplicar el contenedor. Generalmente, se suele usar la opci\u00f3n tipo web. Autom\u00e1ticamente se generar\u00e1n dos fragmentos de c\u00f3digo que aparecer\u00e1n mostrados en una ventana emergente: Insertamos los fragmentos de c\u00f3digo en los lugares pertinentes. Para ello podemos, o bien contactar con el desarrollador, o bien realizar nosotros la inserci\u00f3n. En el caso de decantarnos por la segunda opci\u00f3n, abriremos el archivo en el cual se genere el c\u00f3digo HTML del header de nuestra Web (header.php del tema que se est\u00e9 empleando en el caso de usar WordPress). El primer fragmento de c\u00f3digo se insertar\u00e1 justo tan alto como sea posible antes de la etiqueta de cierre &lt;\/head&gt;. Dentro del mismo documento, buscamos la etiqueta de apertura de &lt;body&gt; e insertamos justo detr\u00e1s el segundo fragmento de c\u00f3digo. Una vez insertado el c\u00f3digo, guardamos el documento y actualizamos el archivo en nuestro servidor FTP (creaci\u00f3n de previa copia de seguridad para poder revertir cambios, si hubiera alg\u00fan error). NOTA: \u00c9ste ser\u00e1 el \u00fanico cambio manual que debamos hacer sobre el c\u00f3digo \u00a0fuente. Una vez instalado el c\u00f3digo de GTM en tu archivo header.php, podemos comprobar si funciona correctamente con la ayuda de la extensi\u00f3n Tag Assistant de Google Chrome. Si al activar la extensi\u00f3n y cargar la p\u00e1gina detecta la etiqueta de GTM pero la muestra en color amarillo y devuelve error 404, no te alarmes. Significa que est\u00e1 correctamente instalado pero a\u00fan no se ha publicado ninguna versi\u00f3n en el contenedor. En cuanto a\u00f1adas una etiqueta y publiques los cambios, todo estar\u00e1 funcionando correctamente y empezar\u00e1s a ver datos en tus cuentas de AdWords y Analytics. Si","og_url":"https:\/\/www.geotelecom.es\/en\/blog\/google-tag-manager-simple-code-insertion\/","og_site_name":"Geotelecom","article_published_time":"2018-07-11T06:23:05+00:00","article_modified_time":"2026-03-16T15:42:30+00:00","og_image":[{"width":856,"height":500,"url":"https:\/\/www.geotelecom.es\/wp-content\/uploads\/2026\/03\/Google-Tag-Manager.png","type":"image\/png"}],"twitter_card":"summary_large_image","twitter_misc":{"Written by":"","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.geotelecom.es\/blog\/google-tag-manager-insercion-simple-codigo\/#article","isPartOf":{"@id":"https:\/\/www.geotelecom.es\/blog\/google-tag-manager-insercion-simple-codigo\/"},"author":{"name":"","@id":""},"headline":"Google Tag Manager: C\u00f3mo simplificar la inserci\u00f3n de c\u00f3digo en tu Web","datePublished":"2018-07-11T06:23:05+00:00","dateModified":"2026-03-16T15:42:30+00:00","mainEntityOfPage":{"@id":"https:\/\/www.geotelecom.es\/blog\/google-tag-manager-insercion-simple-codigo\/"},"wordCount":1150,"commentCount":0,"image":{"@id":"https:\/\/www.geotelecom.es\/blog\/google-tag-manager-insercion-simple-codigo\/#primaryimage"},"thumbnailUrl":"https:\/\/www.geotelecom.es\/wp-content\/uploads\/2026\/03\/Google-Tag-Manager.png","articleSection":["Herramientas"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.geotelecom.es\/blog\/google-tag-manager-insercion-simple-codigo\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.geotelecom.es\/blog\/google-tag-manager-insercion-simple-codigo\/","url":"https:\/\/www.geotelecom.es\/blog\/google-tag-manager-insercion-simple-codigo\/","name":"Google Tag Manager: How to simplify the insertion of code in your Web - Geotelecom","isPartOf":{"@id":"https:\/\/www.geotelecom.es\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.geotelecom.es\/blog\/google-tag-manager-insercion-simple-codigo\/#primaryimage"},"image":{"@id":"https:\/\/www.geotelecom.es\/blog\/google-tag-manager-insercion-simple-codigo\/#primaryimage"},"thumbnailUrl":"https:\/\/www.geotelecom.es\/wp-content\/uploads\/2026\/03\/Google-Tag-Manager.png","datePublished":"2018-07-11T06:23:05+00:00","dateModified":"2026-03-16T15:42:30+00:00","author":{"@id":""},"breadcrumb":{"@id":"https:\/\/www.geotelecom.es\/blog\/google-tag-manager-insercion-simple-codigo\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.geotelecom.es\/blog\/google-tag-manager-insercion-simple-codigo\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.geotelecom.es\/blog\/google-tag-manager-insercion-simple-codigo\/#primaryimage","url":"https:\/\/www.geotelecom.es\/wp-content\/uploads\/2026\/03\/Google-Tag-Manager.png","contentUrl":"https:\/\/www.geotelecom.es\/wp-content\/uploads\/2026\/03\/Google-Tag-Manager.png"},{"@type":"BreadcrumbList","@id":"https:\/\/www.geotelecom.es\/blog\/google-tag-manager-insercion-simple-codigo\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Portada","item":"https:\/\/www.geotelecom.es\/"},{"@type":"ListItem","position":2,"name":"Google Tag Manager: C\u00f3mo simplificar la inserci\u00f3n de c\u00f3digo en tu Web"}]},{"@type":"WebSite","@id":"https:\/\/www.geotelecom.es\/#website","url":"https:\/\/www.geotelecom.es\/","name":"Geotelecom","description":"Digital Marketing Agency","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.geotelecom.es\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"","url":"https:\/\/www.geotelecom.es\/en\/blog\/author\/"}]}},"_links":{"self":[{"href":"https:\/\/www.geotelecom.es\/en\/wp-json\/wp\/v2\/posts\/6141","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.geotelecom.es\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.geotelecom.es\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.geotelecom.es\/en\/wp-json\/wp\/v2\/users\/42"}],"replies":[{"embeddable":true,"href":"https:\/\/www.geotelecom.es\/en\/wp-json\/wp\/v2\/comments?post=6141"}],"version-history":[{"count":1,"href":"https:\/\/www.geotelecom.es\/en\/wp-json\/wp\/v2\/posts\/6141\/revisions"}],"predecessor-version":[{"id":6142,"href":"https:\/\/www.geotelecom.es\/en\/wp-json\/wp\/v2\/posts\/6141\/revisions\/6142"}],"wp:attachment":[{"href":"https:\/\/www.geotelecom.es\/en\/wp-json\/wp\/v2\/media?parent=6141"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.geotelecom.es\/en\/wp-json\/wp\/v2\/categories?post=6141"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.geotelecom.es\/en\/wp-json\/wp\/v2\/tags?post=6141"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}