Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

191
Views
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 answers
Answer question

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 Report

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!