UCF / UCF-WordPress-Theme

A generic, responsive WordPress theme for UCF websites, built off of the Athena Framework.
3 stars 6 forks source link

Add option to use gtag.js instead of analytics.js #59

Open cjg89 opened 5 years ago

cjg89 commented 5 years ago

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