Scope
How to configure to new GA4 from UA?
How to set up Google Analytics 4 with Chargebee-hosted pages?
I am an existing user of Google Analytics, how can I migrate to the latest version?
How to migrate from the Universal Analytics version to Google Analytics 4?
What is the difference between UA and GA4?
Summary
Chargebee provides built-in support for Google Analytics 4 (GA4) by sending checkout and portal events to GA. You can tailor your GA4 data collection to meet the specific requirements of your business by utilizing both the built-in Google support and Chargebee's custom GA integration.
From Google Analytics, in the UA property interface, click Admin under the property column, select the property that you'd like to migrate, and click GA4 setup assistant. If you're doing this for the first time, you can either create a new GA4 Analytics property or connect your existing UA property to the GA4 property.
Solution
Add GA4 to a Site with Universal Analytics(UA)
Add GA4 to your existing UA setup to enhance the tracking and analytical capabilities of your website. You should have at least an Edit role for your GA account.
1. Google setup Assistant Wizard does NOT change or modify your UA account
2. It also does not backfill your new GA4 property with historical data.
3. Your GA4 property will only collect data going from the point where you set up the integration
2. It also does not backfill your new GA4 property with historical data.
3. Your GA4 property will only collect data going from the point where you set up the integration
Steps to Migrate
Follow the below steps to add GA4 to a site with UA.
In the UA property interface, click Admin.
Under the property column, select the property that you'd like to migrate and click GA4 setup assistant. If you're doing this for the first time, you can either create a new GA4 Analytics property or connect your existing UA property to the GA4 property.
Click Create property.
Refer to this link on how to add a Google Analytics 4 property (to a site that already has Analytics).
How to get GA4 Measurement ID
You can use the Measurement ID to send data to a specific web data stream.
Follow the steps below to get your GA4 Measurement ID.
Login to your GA4 analytics account.
Navigate to the Admin section.
Under the property section, Click Data streams.
Select the data stream that you wish to track(likely to be your website). Then in the upper right corner, you can see your measurement ID. Refer to this link to know more about G-ID.
Click View tag instructions > Install manually and replace the existing GA script with this one.
If you use Google analytics.js on your site, then e-commerce events will not be sent by the built-in GA integration. You must have gtag.js instead.
Dual Tagging for Google Analytics
If you wish to track both UA and GA4 properties, then update the existing script of your analyitcs to add the new Google tag('G-XXXXXXXXXX') on each page of your website from the JavaScript snippet for your account along with the existing script for your website.
Refer to this link for more information.
Related Articles
Can I pass Google Analytics parameters along with Chargebee’s hosted page URL?
Where do I add my domain for the allow-list?