This article describes how to instrument a site with tags to populate Universal Analytics (UA) and Google Analytics 4 (GA4) properties at the same time.
Only basic tag installation is covered. For additional guidance on topics such as the GA4 Setup Assistant wizard see Add Google Analytics 4 to an existing site and for ecommerce see Ecommerce migration .
Select the library you are currently using:
Set up the basic page tag
If you already use gtag.js for your UA property, either of the following options can be used to install Google Analytics 4:
- Option 1: Follow Add additional products and configure the tag ID of your GA4 property as an additional product.
- Option 2: Use connected site tags to add your tag ID without changing the code on your page.