Hi Haley, my apologies for the slow reply. So it is technically possible to have 2 separate tags, one for UA and GA4. However it's not really necessary to drop in 2 separate code snippets. There are actually many different ways to dual tag your site. If you are starting with a brand new web property, you simply create a GA4 property, then under the "Property Setup" page click on "Show advanced options", then you can toggle "Create a Universal Analytics property". This will automatically create a single code snippet that includes both the GA4 and UA property ID. On the other hand, if you have an existing website with UA tags, there are a number of ways to add in the GA4 tag, from upgrading your UA tag within the GA admin to adding a new config directive. See sample code below for the latter: "> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', ''); gtag('config', 'G-XXXXXXXX');
Yes, you can start with a GA4 property, and create a UA tag at the same time. To do this, when you go to create a new property (using GA4), under the "Property Setup" page click on "Show advanced options", then you can toggle "Create a Universal Analytics property". This will automatically create a single code snippet that includes both the GA4 and UA property ID.
So you can have two separate google analytics script codes? I thought you had to combine them.
I thought the same too.
Hi Haley, my apologies for the slow reply. So it is technically possible to have 2 separate tags, one for UA and GA4. However it's not really necessary to drop in 2 separate code snippets.
There are actually many different ways to dual tag your site.
If you are starting with a brand new web property, you simply create a GA4 property, then under the "Property Setup" page click on "Show advanced options", then you can toggle "Create a Universal Analytics property". This will automatically create a single code snippet that includes both the GA4 and UA property ID.
On the other hand, if you have an existing website with UA tags, there are a number of ways to add in the GA4 tag, from upgrading your UA tag within the GA admin to adding a new config directive. See sample code below for the latter:
">
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '');
gtag('config', 'G-XXXXXXXX');
Tell me if I have created GA4 first, then there is option to create universal analytics or not.
Yes, you can start with a GA4 property, and create a UA tag at the same time. To do this, when you go to create a new property (using GA4), under the "Property Setup" page click on "Show advanced options", then you can toggle "Create a Universal Analytics property". This will automatically create a single code snippet that includes both the GA4 and UA property ID.