The.com is compatible with Google Analytics 4 (GA4). Currently, you can integrate GA4 by adding scripts to the <head> of each page you want to track. If you are familiar with GA, feel free to skip to the different sections:
Creating a New Analytics Account
If you do not already have a Google Analytics account, sign up. You will then go through three steps to set up your account.
1. Give the account a name.
2. Give the Google Analytics 4 property a name. This property represents your website's data and you can have multiple properties per account.
3. Fill out the Business Information Form.
Then, click the blue Create button and agree to Google's terms and conditions. You will be taken to your new property's dashboard which will look like this:
Skip to the "Connecting GA4 to The.com" Section of this article to learn how to add the tracking scripts to your site.
Creating a New Property
If you already have a GA account and want to create a new property, click the Admin at the bottom of the left side menu. Then click + Create Property and Google will guide you from there.
Your new property will be set up with GA4, so all you have to do now is add the tracking scripts to your site. Skip to the "Connecting GA4 to The.com" section of this article to learn how to do this.
Upgrading to GA4
If you have an existing property, you can upgrade it to a Google Analytics 4 property. This will create new code snippets to add to your site since that Universal Analytics (UA) tracking ID has been replaced with the Measurement ID.
In the Account column, select the account in which you want to create the property. (If you only have one Google Analytics account, it will already be selected. However, if you have more than one Google Analytics account, make sure that the account you want is selected.)
In the Property column, select the desired Universal Analytics property.
Click Upgrade to GA4.
You’ll now have the option to either create a new Google Analytics 4 property or connect to an existing one. To upgrade your property, follow the steps the create a new property.
Create a New Property
Under “I need to create a new Google Analytics 4 property”, click Get Started.
If your site uses the gtag.js tag, you’ll have the option to Enable data collection using your existing tags. Note: If you've implemented any custom tags for your Universal Analytics property, this option won’t replicate the functionality for your Google Analytics 4 property. Read Considerations when using connected site tags.
Click Create Property.
Analytics will now create your new Google Analytics 4 property, copying basic data such as the property name, URL, timezone, and currency from your Universal Analytics property. Analytics will also automatically enable enhanced measurement for your Google Analytics 4 property. You’ll then be taken to Setup Assistant in your new Google Analytics 4 property. There, you can see the available options for migrating (or setting up from scratch) your configuration settings.
Connecting GA4 to The.com
In the Admin view, select Setup Assistant in the Property column. Then click Tag Installation and then Web.
Type in your website URL and a name for your data stream. Click Create Stream.
You will then be shown your Measurement ID and Stream ID:
Add New On-Page Tag
Scroll down to the Tagging Instructions section. Expand the Global Site Tag (gtag.js) option to view the code that you need to add to every webpage you want to track.
You will see two <script> tags.
For the first tag, copy the src value of the first script tag, so:
Note that "YOUR-MEASUREMENT-ID" will be a string unique to your account. Now,
Go to the Page for a page you want to track.
Navigate to the <head> of the Page.
Create a new Script Element.
Paste the code in the Source attribute.
Click on the Async attribute to toggle that value to "Async."
For the second tag, go back to your GA account and copy the contents of the second script tag:
window.dataLayer = window.dataLayer || ;
gtag('js', new Date());
The following steps are similar but not the same as the first script:
Make sure you are on the <head> of the page.
Create a new Script Element.
Paste the code in the Text attribute.
Repeat this on all pages that you wish to capture analytics for, or copy and paste each script on every page. If you already have Script Elements that include the old version of Google Analytics (has the Universal Analytics, or "UA-", in the script), you can update them without having to create new Script Elements. Just copy the appropriate code snippets into the correct Script Element.