Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

193
Visualizações
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 Respostas
Responde à pergunta

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 Relatório

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda