How to Get Started with Google Analytics
Have you ever wondered where your website visitors come from, how long they stay on your site, and what content they like the most? Google Analytics is your answer. It's a free service from Google that generates detailed statistics about your website visitors — and it only works if it's installed.
There are two fundamental steps to getting started: 1) set up a Google Analytics account, and 2) place the tracking code on your website. Here's how to do both, updated for GA4 — the current version of Google Analytics.
For an overview of what Google Analytics tracks and why it matters, see What Is Google Analytics?
Step 1: Create a Google Analytics Account
Go to analytics.google.com and sign in with your Google account (or create one if you don't have one). Click "Start measuring." Give your account a name — typically your business name.
Step 2: Set Up a Property
A "property" in Google Analytics represents your website. Give it a name (your site name), set your reporting time zone and currency, then click Next. Select your business category and size, then click Create.
Step 3: Get Your Tracking Code
After creating the property, you'll be prompted to set up a data stream. Select "Web," enter your website URL, and give the stream a name. Google will provide you with a Measurement ID (starts with "G-") and a tracking code snippet.
Step 4: Install the Code on Your Website
How you install it depends on your platform:
- WordPress: The easiest method is the Google Site Kit plugin — it connects your site to Google Analytics, Search Console, and other Google tools with a few clicks, no code editing required.
- Squarespace: Go to Settings > Advanced > External API Keys and paste your Measurement ID.
- Wix: Go to Marketing & SEO > Marketing Integrations > Google Analytics and enter your Measurement ID.
- Manual (any platform): Copy the tracking code snippet and paste it into the
<head>section of every page on your site.
Step 5: Verify It's Working
After installing, go back to Google Analytics and check the Realtime report (Reports > Realtime). Open your website in another browser tab. Within a minute or two, you should see yourself appear as an active user in the Realtime report. If you see data, it's working.
Step 6: Connect Google Search Console
For the most complete picture of your site's performance, connect Google Search Console to GA4. In GA4, go to Admin > Property Settings > Search Console Links. This adds organic search query data to your Analytics reports.