Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

194
Vistas
Why gtag.js is loading 2 scripts instead of 1?

When I install my gtag.js code in <head> I'm surprised that I have two scripts loaded. I don't understand why. One is from analytics and the other from googletagmanager: Scripts loaded

I cant find any info about that. Anybody knows why this happens?

about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

Gtag.js is Google's "global" tag, a sort of scaled down tag manager that only serves Google scripts (and uses the same infrastructure as the tag manager proper, hence googletamanager.com as origin domain).

So gtag is the delivery and configuration mechanism, but to do any actual work, the assets for Google Analytics (Google Ads etc, whatever Google script you chose to implement via gtag.js) still have to be loaded.

about 4 years ago · Juan Pablo Isaza Denunciar

0

The tag manager is a general utility used to load different resources for Google stuff. There are dozens of different resources, including adwords, surveys, A/B testing stuff, analytics, etc (see your tag manager dashboard). In your case, you are only using analytics, so the tag manager only loads the analytics code.

Furthermore, each asset is only loaded when a certain "trigger" happens. In most cases, the trigger for analytics is "Page Load", which is why you are seeing the two requests happen pretty much right next to each other. You could update the trigger to be something like a form submission, youtube video watch, etc... and you would only see the resource loaded when that trigger happens.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda