Provide an option that allows users to either use Google's analytics.js script or their newer gtag.js script for incorporating Google Analytics (for users not using Google Tag Manager).
Why it's Important
gtag.js seems to be what Google is recommending now vs analytics.js. Providing the option to use one versus the other would preserve backward compatibility for any child theme that expects analytics.js to be loaded.
Description
Provide an option that allows users to either use Google's analytics.js script or their newer gtag.js script for incorporating Google Analytics (for users not using Google Tag Manager).
Why it's Important
gtag.js seems to be what Google is recommending now vs analytics.js. Providing the option to use one versus the other would preserve backward compatibility for any child theme that expects analytics.js to be loaded.
More info: https://developers.google.com/analytics/devguides/collection/gtagjs/migration
Alternatives
n/a
Possible Implementation
Add a new customizer option that lets users select either script. Default to analytics.js to preserve backward compatibility.
Additional context
n/a