Customize Google Analytics in Hugo Website
Guide to replace google analytics.js with gtag.js in Hugo
If you are using Hugo as a static site generator tool and using google analytics for your website then you can customize the analytics script and replace the old google analytics script analytics.js with recommended new script gtag.js with just few changes.