Google Analytics dashboard illustration Website · Analytics

How to Add Google Analytics to Your Website (And What to Track)

Updated June 2026 7 min read

Running a website without analytics is like running a store without knowing how many people walked in, which products they looked at, and why they left without buying. Google Analytics 4 (GA4) is free, powerful, and takes about 20 minutes to set up. Here's exactly how to do it — and more importantly, what to actually pay attention to once the data starts coming in.

Why tracking matters more than you think

Without tracking, you're guessing. You might assume your homepage is doing its job — but analytics might show you that 80% of your visitors leave without scrolling past the fold. You might think your blog is driving traffic — but the data might reveal it's your "Services" page that's responsible for most contact form submissions.

Analytics tells you where people come from, what they do on your site, and where you lose them. With that data, you can make decisions that actually improve results — not just redesign for the sake of redesigning.

1

Create a Google Analytics account

Go to analytics.google.com. Sign in with the Google account you want to own the analytics data — ideally a business Gmail, not a personal one.

Click "Start measuring." You'll be prompted to create an Account Name (use your business name) and then a Property.

2

Set up a GA4 property

During setup, make sure you're creating a GA4 property — not Universal Analytics (which was sunset in 2023). When asked for the platform, choose "Web." Enter your website URL and give the property a name. Select your industry category and reporting time zone.

Warning

If you see any reference to "Universal Analytics" or "UA-" in the setup flow, you're looking at an outdated version. GA4 properties start with "G-" not "UA-". Make sure you're on the right one.

3

Get your Measurement ID

After creating the property, go to Admin → Data Streams → click your web stream. You'll see your Measurement ID — it looks like G-XXXXXXXXXX. Copy this. You'll need it in the next step.

Pro Tip

While you're here, enable "Enhanced measurement" — it automatically tracks page views, scroll depth, outbound clicks, and video engagement without extra setup.

4

Add the tracking code to your website

Paste this code in the <head> section of every page on your site, replacing G-XXXXXXXXXX with your actual Measurement ID.

<script async src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXXXX"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());
  gtag('config', 'G-XXXXXXXXXX');
</script>

If you're on WordPress: Install the "Site Kit by Google" plugin — it handles the installation automatically and connects Search Console too.

If you're on Webflow: Go to Project Settings → Custom Code → paste in the Head code section.

If you're on Squarespace: Go to Settings → Advanced → Code Injection → paste in the Header.

If you use Google Tag Manager: Add a GA4 Configuration tag with your Measurement ID instead of pasting directly.

Is your website set up to track what matters?

A GrowthLeaks audit checks whether your tracking is properly installed, what data you're missing, and what your site is actually doing for your business.

Get My Audit — $10

One-time · Website + GBP audit · Delivered in 24 hours

5

Verify it's working

After adding the code, go to your GA4 property and click "Realtime" in the left menu. Open your website in another browser tab. You should see yourself appear as an active user within a minute.

If nothing shows up after 2 minutes:

Full data (not Realtime) takes about 24–48 hours to populate in your reports.

6

Set up key conversion events

GA4 tracks pageviews automatically. But what you really want to track are the actions that mean money — phone call clicks, form submissions, map clicks, chat initiations.

In GA4, go to Admin → Events → Create event. Or better: use Google Tag Manager to fire events when specific buttons are clicked.

The events that matter most for local businesses:

Pro Tip

Once you're tracking these, mark them as Conversions in GA4 (Admin → Conversions → New conversion event). This lets you see conversion rate by traffic source — which is the insight that actually changes how you spend your marketing budget.

7

Connect to Google Search Console

Google Search Console shows you what search queries bring people to your site. Connecting it to GA4 lets you see that data alongside your analytics.

To connect: In GA4, go to Admin → Property Settings → Search Console Links → Link.

Sign in to Search Console at search.google.com/search-console. If you haven't verified your site there yet, you'll need to do that first — use the "HTML tag" verification method (paste a meta tag in your head).

Once connected, find the combined data in GA4 under Reports → Acquisition → Search Console.

Metrics that actually matter for local businesses

Don't get lost in the data. These are the numbers that actually tell you something useful:

Check these once a week, not every day. Looking too often at short-term data creates noise, not insight.

What to stop obsessing over

Bounce rate — GA4 replaced it with Engaged Sessions, which is better. Don't stress over a high bounce rate.

Page views alone — a page with 10,000 views and zero conversions isn't doing its job. A page with 100 views and 20 phone calls is.

Averages — average session duration, average pages per session. These are blended numbers that hide more than they reveal.

Focus on the metrics listed above and ignore the rest until you've got the basics humming.

Find out what your website is really doing.

A GrowthLeaks audit gives you a clear picture of your website's performance — what's working, what's broken, and what to fix first.

Get My Audit — $10

One-time · Website + GBP audit · Delivered in 24 hours

Frequently Asked Questions

Yes. Google Analytics 4 is completely free for standard use. Google also offers a paid version called GA4 360 for enterprise users with very high traffic volumes, but the free version is more than sufficient for any local business.

The Realtime report shows live data within minutes of installation. Standard reports take 24–48 hours to populate. You'll have a full picture of your first week's traffic within about 2 days of setting up.

Minimally. The GA4 tag loads asynchronously, meaning it doesn't block your page from loading. In PageSpeed tests, it may show as a minor deduction, but it won't meaningfully hurt your user experience or rankings. The data you gain is worth it.

Universal Analytics (UA) was the previous version of Google Analytics. Google shut it down in July 2023 — it no longer collects data. GA4 is the current version. If your site still has a UA tracking ID (starts with UA-), you need to set up GA4 immediately — you've been flying blind since mid-2023.

Make sure your phone number is an actual link using href='tel:+15551234567'. Then in Google Tag Manager, create a trigger that fires on clicks to links starting with 'tel:'. Fire a GA4 event tag called 'phone_click'. Mark it as a conversion in GA4. This gives you a count of how many people tapped your phone number from your website.

Yes. Google Analytics collects data about your visitors, which triggers privacy disclosure requirements in most jurisdictions. At minimum, your privacy policy should mention that you use Google Analytics to collect anonymous usage data. This is required in the EU (GDPR), California (CCPA), and increasingly other states. A privacy policy page is good practice regardless.