I have a website that is running the Universal Analytics (UA) version of Google Analytics. I would like to add support for Google Analytics 4.
The documentation for adding Google Analytics 4 support asks me to add a gtag.js
script to my web pages. If I want to continue using UA, do I need to use both analytics.js
and gtag.js
, or can I just replace the analytics.js
tag with gtag.js
because it will be enough to supply data to both UA and GA4?