HomeAbout
Setting Up Google Analytics 4 From Scratch: A Complete Guide for Law Firms

Guide

Setting Up Google Analytics 4 From Scratch: A Complete Guide for Law Firms

LexGrow · · SEO Tools

If you've never set up Google Analytics before, don't worry. This guide will walk you through the entire process — from creating your account to seeing your first data come in. There are no prerequisites other than a Google account. By the time you're finished, you'll have a powerful (and completely free) analytics tool tracking every visit to your law firm's website.

What Google Analytics 4 does for your law firm

Google Analytics 4 — usually shortened to GA4 — is a free service from Google that tracks what happens on your website. Once installed, it quietly records information like:

  • How many people visit your site each day, week, or month.
  • Which pages they look at — for example, whether more visitors read your personal-injury page or your family-law page.
  • Where they came from — did they find you through a Google search, a social-media link, or by typing your address directly into their browser?
  • How long they stay — a visitor who reads your page for three minutes is much more engaged than one who leaves after five seconds.
  • What devices they use — phone, tablet, or desktop computer.

Why does any of this matter for a law firm? Because it turns guesswork into evidence. Instead of wondering whether that new blog post is attracting potential clients, you can see exactly how many people read it. Instead of hoping your Google Business Profile is driving traffic, you can confirm it with real numbers. And when you're deciding where to spend your next marketing dollar, analytics data tells you which channels are already working and which ones aren't.

What you'll need

  • A Google account. A regular Gmail address works perfectly. If your firm already uses Google Workspace (the business version of Gmail), use that account instead.
  • Access to your law firm's website — or, at the very least, your web developer's email address or phone number. You'll need to add a small piece of code to the site, and your developer can do this for you if you're not comfortable editing the site yourself.
  • About 20 to 30 minutes of uninterrupted time. Each step is simple, but there are several of them, so it helps to do this in one sitting.

Step 1: Create a Google Analytics account

An "account" in Google Analytics is just a container that holds all the data for your firm. Most law firms only need one account.

  1. Open your web browser and go to analytics.google.com. Sign in with the Google account you want to use.
  2. If you've never used Google Analytics before, you'll see a welcome screen. Click the blue "Start measuring" button.
  3. You'll be asked for an Account name. Enter your firm's name — for example, "Smith & Associates" or "Downtown Family Law." This is just a label for your own reference; clients will never see it.
  4. Below the name field, you'll see a set of data-sharing checkboxes. The defaults are fine for most firms. You can leave them all checked or uncheck any that make you uncomfortable — none of them affect how analytics works on your site.
  5. Click "Next" to continue.

Step 2: Create a property

A "property" represents a single website (or app) that you want to track. Since you're setting this up for your law firm's website, you'll create one property.

  1. Property name: Enter something recognizable, like your firm's website name or your firm name. For example, "Smith Law Website" or "smithlaw.com."
  2. Reporting time zone: Select the time zone where your firm is located. This ensures your daily reports start and end at midnight your time.
  3. Currency: Choose your local currency (most U.S. firms will pick US Dollar).
  4. Click "Next."
  5. On the Business details screen, select "Legal Services" for your industry category (if the exact wording isn't available, pick the closest match). Choose the firm-size option that best describes your practice.
  6. Click "Next."
  7. On the Business objectives screen, check "Examine user behavior" and "Generate leads." These two objectives tell GA4 which default reports to show you — and they happen to be the most useful ones for a law firm.
  8. Click "Create."
  9. A Terms of Service dialog will appear. Select your country, review the terms, check the acceptance box, and click "I Accept."

Step 3: Set up a data stream

A "data stream" is the connection between your website and your new GA4 property. It's how the data actually flows in.

  1. After accepting the terms, you'll be prompted to choose a platform. Click "Web" (the first option).
  2. In the Website URL field, type your firm's full web address — for example, https://www.yourfirm.com. Make sure to include the https:// part.
  3. In the Stream name field, enter something like "Main Website" or "Firm Website."
  4. Click "Create stream."
  5. You'll now see your stream details page. The most important item here is your Measurement ID. It's a short code that starts with "G-" followed by a mix of letters and numbers (for example, G-AB12CD34EF). This is your unique tracking ID.
  6. Keep this page open — you'll need information from it in the next step.

Step 4: Install the tracking code on your website

Now comes the part where you actually connect GA4 to your site. There are three ways to do this. Pick whichever one matches your situation.

Option A: If your site uses WordPress

  1. Log in to your WordPress admin dashboard (usually at yourfirm.com/wp-admin).
  2. Go to Plugins > Add New and search for "Site Kit by Google." This is a free, official plugin made by Google.
  3. Click "Install Now" and then "Activate."
  4. Site Kit will walk you through a short setup wizard. Sign in with the same Google account you used to create your GA4 property.
  5. When prompted, grant Site Kit permission to access your Analytics data.
  6. The plugin automatically adds the GA4 tracking code to every page of your site — there's nothing else you need to do.

Option B: If your site uses another platform or a custom build

  1. Go back to the stream details page in Google Analytics (the one showing your Measurement ID).
  2. Click "View tag instructions."
  3. Click the "Install manually" tab.
  4. You'll see a block of code that starts with <!-- Google tag (gtag.js) -->. Click "Copy" to copy the entire snippet.
  5. If you use a website builder like Squarespace, go to Settings > Advanced > Code Injection and paste the code into the Header field. On Wix, go to Settings > Custom Code and add it to the head of every page. On Webflow, open Project Settings > Custom Code and paste into the Head Code box.
  6. Save your changes. The tracking code will now load on every page of your site.

Option C: Ask your web developer

If the above sounds too technical, that's completely fine. Simply forward your Measurement ID (the G-XXXXXXXXXX code) to your web developer or IT person and say:

"Can you install Google Analytics 4 with this Measurement ID on our website?"

Any competent web developer can do this in under ten minutes. It's a routine task — they will know exactly what to do.

Step 5: Verify it's working

You've done the hard part. Now let's make sure everything is connected correctly.

  1. Go back to analytics.google.com and make sure your new property is selected (you'll see the property name at the top of the page).
  2. In the left sidebar, click "Reports" and then "Realtime" (sometimes labeled "Realtime overview").
  3. Open a new browser tab and visit your own website. Click around on a page or two.
  4. Go back to the Google Analytics tab. Within about 30 seconds, you should see at least 1 active user on the Realtime report. That active user is you.
  5. If the count shows 1 or more — congratulations, it's working! GA4 is now tracking visits to your site.

If nothing appears after a couple of minutes, double-check that the tracking code was saved correctly on your site. The most common issue is the code not being placed inside the <head> section of the page, or accidentally pasting only part of the snippet. Ask your developer to verify the installation if you're stuck.

Step 6: Find your Property ID for LexGrow

Now that GA4 is running, there's one more number you'll want to grab — your Property ID. This is different from your Measurement ID. While the Measurement ID (the G- code) is what the tracking code uses, the Property ID is a numeric identifier that other tools — including LexGrow — use to pull data from your account.

  1. In Google Analytics, click the gear icon (labeled "Admin") in the bottom-left corner of the screen.
  2. In the "Property" column (the middle column on the Admin page), click "Property details" or "Property Settings" — the label depends on which version of the admin interface you see.
  3. At the top of the page, you'll see your Property ID. It's a plain number — just digits, no dashes or letters — for example, 123456789.
  4. Copy this number. You'll paste it into LexGrow when you connect your analytics account.

For the full walkthrough on connecting this Property ID to LexGrow and setting up the necessary permissions, see our companion guide: Connecting Google Analytics to Your LexGrow Dashboard.

What happens next

GA4 starts collecting data the moment the tracking code is live on your site, but it takes 24 to 48 hours for the standard reports (the non-Realtime ones) to populate with meaningful information. Don't be alarmed if most of the report pages look empty at first — they'll fill in as data accumulates.

Over the coming days and weeks, you'll start to see patterns: which practice-area pages attract the most visitors, which days of the week are busiest, and whether people are finding you through Google searches, social media, or other sources. The more traffic your site receives, the richer and more useful these insights become.

Once your GA4 property is collecting data, connect it to LexGrow to see your analytics alongside your SEO metrics, keyword rankings, and local-search performance — all in one place, without juggling multiple dashboards.

You just set up one of the most powerful free tools available to any business. Most law firms never bother looking at their analytics, which means you're already ahead of the competition. Keep an eye on those reports, and let the data guide your marketing decisions going forward.

Topics

google analyticsga4analytics setuptracking codelaw firm seo

Put these ideas into practice

Start with a free SEO, GEO & AEO visibility review on a short call — then explore published pricing and LexGrow solutions with your markets in mind.

Book your free visibility review

General contact