This means that “https://www.googletagmanager.com/gtag/js” file loads twice. It’s a 40 KB file, with no benefit for loading multiple times.
This code accomplishes the same thing, minus 40 KB of dead weight:
I’ve seen folks shave 200KB off their site by merely getting rid of extra gtag/js files. You can take it a step further and consolidate events, too- I don’t need to fire a conversion event twice, I can just add multiple destinations to my send_to variable:
This tip isn’t specific to gtag, though that is one of the tags that I see duplicated the most. Anytime you are deploying two tags from the same vendor on a page, odds are there is some part of that code that doesn’t need to be repeated.