What Is a Google Analytics Tracking ID?
A Google Analytics tracking ID is a unique identifier thatâs automatically assigned to each website or app in Google Analytics, a popular platform for tracking user behavior.
The tracking ID is used during GA installation. To ensure that user interaction data from your website or app is transferred to the correct data container.
Google Analytics 4
In Google Analytics 4 (GA4), a tracking ID for a website is called the measurement ID.
It typically has the structure âG-XXXXXXX.â Where âXXXXXXXâ is a unique alphanumeric code.
The measurement ID is frequently referred to as the Google tag ID.Â
And itâs also used in the Google tagâthe unique tracking code that can be used to manually install GA4 on a website or app.
Hereâs where youâll find the ID in the GA4 tracking code:
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXX"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-PSW1MY7HB4');
</script>Universal Analytics
In Universal Analytics (UA), the predecessor to GA4, each property had what was called a tracking ID.
The ID had the structure âUA-XXXXX-Y.â Where âXXXXXâ was a series of numbers that represented your account ID and âYâ was the property number within the account.
How to Find Your Google Analytics Measurement ID
Letâs learn where to find the Google Analytics Tracking ID in GA4.
First, sign in to Google Analytics. And open or create your property.
Then, type âMeasurement IDâ into the search bar at the top and refer to the correct result.

Alternatively, go to âAdminâ > âProperty settingsâ > âData collection and modificationâ > âData streamsâ and choose a data stream.

Then, refer to the âMeasurement IDâ section.Â
Note that you can copy the ID by clicking the icon alongside it.

How to Install GA4 on Your Website
There are three different ways to install GA4 on your website:
- Option 1: Install via your website builder or content management system (CMS). If your platform or plugin offers support for GA4, this tends to be the simplest method.
- Option 2: Configure GA4 in Google Tag Manager (GTM). This tool lets you manage all your Google tags in one place. And it gives you advanced functionality and greater control.
- Option 3: Manually add the GA4 tracking code to your website
Letâs explore each method in detail.
Option 1: Install via Your Website Builder or CMS
Many website builders and CMS platforms (including Magento, Shopify, Wix, and WordPress) offer native support for GA4. And some offer plugins that allow you to integrate the tool.
Generally, all you need to do is enter your measurement ID into a Google Analytics field.
For example, hereâs what the field looks like in WordPress:

To find detailed instructions for your platform, sign into GA4 and open or create your property.
Then, go to âAdminâ > âProperty settingsâ > âData collection and modificationâ > âData streams.â
And click a data stream.

Scroll down to the âGoogle tagâ section and click âConfigure tag settings.â

Next, click âInstallation instructions.â

Click âSelect your platform.â Then, if available, select your platform from the list.

Google will provide your Google tag ID and all the instructions you need.

Option 2: Configure GA4 in Google Tag Manager
Google Tag Manager (GTM) is a free tool that helps you manage various kinds of Google tags. Including the one used for GA4 installation.
In addition to setting up your GA4 property and web data stream, youâll need to:
- Create an account in Tag Manager
- Create a âcontainerâ (a space to house all the tags, etc.) for your website
- Install the container on your websiteÂ
When youâre ready to configure GA4, open the relevant container in GTM.
And click âAdd a new tag.â

Then, click âTag Configurationâ > âGoogle Analyticsâ > âGoogle Tag.â

Enter the measurement ID for your GA property in the âTag IDâ field.

Then, follow the instructions in our GTM guide to configure the remaining settings to your needs.
Option 3: Manually Add the GA4 Tracking Code to Your Site
To manually install GA4, you need the Google tag for your data stream.
To find it, sign into Google Analytics. And open or create your property.
Then, go to âAdminâ > âProperty settingsâ > âData collection and modificationâ > âData streams.â
And click a web data stream.

Scroll down to the âGoogle tagâ section and click âConfigure tag settings.â

Then, click âInstallation instructions.â

Youâll find the Google Analytics code in the âInstall manuallyâ tab.
Click the icon in the upper right to copy it.

Next, you need to add the GA tracking code to your website. It should go immediately after the <head> tag in every webpage or webpage template.
Like this:
<!DOCTYPEÂ html>
<html>
<head>
 <!-- Insert GA4 tag here -->
<!-- Other <head> elements like CSS links, meta tags, etc., go here -->
</head>
<body>
 <!-- Website content here -->
</body>
</html>When youâve installed the Google tag, return to the GA4 page you were on last.Â
Then, enter your domain in the âTest your website (optional)â field and click the âTestâ button to check if everythingâs working correctly.

Take the Next Step: Integrate GA4 with Semrush
By connecting your GA4 property to Semrush, you can get additional insight into your websiteâs performance. And make better decisions for your business.
Letâs see what you can do with GA4 data in five popular tools.
On Page SEO Checker
The On Page SEO Checker provides tailored recommendations to help your webpages appear higher for relevant search engine queries.
To connect to GA4, click the âConnectâ button next to âUser Experience Ideas.â

Then, follow the prompts.
The tool will then determine whether each page has a high bounce rate (i.e., lots of visitors leave without engaging) or a low time on page (i.e., lots of visitors leave soon after arriving).
These issues can suggest that your page is unsatisfactory and needs to be improved.

The tool may also provide ideas relating to keyword strategy, SEO backlinks (links to your site from other sites), content optimization, etc. So you can easily determine where to focus your on-page SEO efforts.

Backlink Audit
The Backlink Audit tool makes it easy to review and monitor your siteâs backlinks.
To link your GA4 account, click the âIntegrationsâ button in the top right corner.
Then, select âConnectâ under âGoogle Analyticsâ and provide the details requested.

Once youâre connected, you can see how much referral traffic each backlink drives:

This data can help you evaluate the value and quality of each backlink.
Organic Traffic Insights
The Organic Traffic Insights tool helps you discover â(not provided)â keywords in Google Analytics.
If you havenât noticed before, GA4 marks most search terms as â(not provided)â when you try to find them in your reports.
Like this:

This means you canât work out which search terms led users to your site.
But Organic Traffic Insights uncovers these keywords by combining data from Semrush, GA4, and Google Search Console.

The tool also displays useful metrics from all three platforms in one simple interface.
Site Audit
The Site Audit tool checks your website for issues that could harm its performance in Google Search.
Connect your Google Analytics account by clicking the gear icon in the top right corner and selecting âGoogle Analytics: not connected.â Then, follow the remaining prompts.

Once youâre connected, the tool will display pageviews (now called âviews" in GA4) data. So you can prioritize issues based on each pageâs popularity.

The GA integration also allows you to check more thoroughly for orphan pagesâpages on your site that arenât linked to from anywhere else on your site.

Adding internal links to these URLs is good for both the user experience and SEO.
Position Tracking
The Position Tracking tool makes it easy to track your Google keyword rankings (i.e., how high up in the results your website appears for relevant search queries).
You can import keywords youâre already ranking for from Google Analytics.

For each tracked keyword, you can see your ranking positions on the selected dates.Â
And gather lots of other useful data.

Use this information to keep an eye out for trends in your rankings. So you can take steps to improve your pages if needed.
Start Collecting and Analyzing Data
With the right marketing data at your fingertips, you can make better decisions for your business.
Get started by setting up GA4 and claiming your free Semrush trial.
