Chapter 11: Google Analytics and Search Console
The short answer: Google Analytics 4 shows you how many people visit your site and what they do. Google Search Console shows you which Google searches find you, and warns you about problems. Both are free. Set up both, add a sitemap, and check them once a month.
| What you need | Time | Cost |
|---|---|---|
| Your Google account. Your live site on your domain (Chapter 8). | About 30 minutes | $0 |
What gets measured gets better.
The difference, in one line each
- Search Console: what happens before someone clicks (which searches show your site, and how often).
- Analytics: what happens after they click (how many visit, which pages, and whether they contact you).
Part 1: Google Search Console (do this first)
- Go to search.google.com/search-console and sign in.
- Click Add property and choose Domain. Type your domain without
https://orwww, likesmithpainting.com. - Google gives you a TXT record. Add it in Cloudflare (DNS, Records, Add record, type TXT, name
@), the same way as in Chapter 9. Google may also offer to do this for you automatically with Cloudflare. - Click Verify.
Add a sitemap
A sitemap is a simple list of your pages, so Google finds them all. Ask the AI:
Write a sitemap.xml for my website https://[yourdomain].com with these
pages: [list your page file names, like index.html, services.html].
Use the clean URLs (https://[yourdomain].com/ for index.html).
Give me the file only.
Save it as sitemap.xml in your website folder, upload the folder again (Chapter 7), then in Search Console click Sitemaps, type sitemap.xml and click Submit.
Part 2: Google Analytics 4
- Go to analytics.google.com and click Start measuring.
- Name the account after your business. Click Next.
- Name the property (your website) and choose your time zone and currency.
- Choose your business size and goals, then accept the terms.
- Choose Web, type your domain, name the stream and click Create stream.
- Google shows a Measurement ID that starts with
G-, and setup code ("Google tag"). Copy the code. - Ask the AI in your Chapter 5 chat: "Add this Google tag to the
<head>of every page, right after the opening<head>tag: [paste]. Give me the whole updated file." - Save, upload again, then visit your site. In Analytics, open Reports, then Realtime. You should see yourself as a visitor.
Link the two
In Analytics, go to Admin, find Search Console links and link your Search Console property. Now you can see searches and visits in one place.
Add a privacy page and a cookie notice (free)
Google Analytics uses cookies, so tell visitors, and let them say no.
1. A privacy page. Say what you collect (form answers, analytics), which tools handle it (Google, Cloudflare, your form tool) and how to contact you. Ask the AI: "Write a plain-English privacy policy for my small business website. I use Google Analytics 4, [Google Forms or Tally] and Cloudflare hosting. I do not sell data. Contact: [email]. Keep it short and clear." Then read it carefully; for anything legal, a lawyer's review is worth it.
2. A cookie notice, without paying for a cookie tool. You do not need a paid service. A small banner with Accept and Decline buttons, plus Google's free Consent Mode, means Analytics only stores cookies after someone clicks Accept. Ask the AI:
Add a small cookie notice to the bottom of every page of my site.
- Text: "We use cookies from Google Analytics to see how people use this
site. [Privacy](/privacy/)"
- Two equal buttons: "Accept" and "Decline".
- Use Google Consent Mode v2: before my Google tag loads, set
analytics_storage and ad_storage to "denied" by default. On Accept,
update analytics_storage to "granted". On Decline, keep it denied.
- Remember the choice in localStorage so the banner does not come back.
- Plain HTML, CSS and JavaScript. No outside libraries. Accessible:
keyboard friendly and readable contrast.
Here is my current file: [paste]. Give me the whole updated file.
Test it: open your site in a private window, click Decline, and check that Analytics Realtime does not show you. Then try Accept.
Prefer no cookies at all? Cloudflare offers free Web Analytics that counts visits without cookies. It is simpler and shows less, but it is a fine start.
What to look at once a month
- Search Console, Performance: which searches show your site. Are your service and town in there?
- Search Console, Pages: are all your pages indexed? Any errors?
- Analytics, Reports: how many visitors, and which pages they look at most.
Five minutes a month is enough.
Common mistakes
- Adding the tag to only one page. Every page needs it.
- Checking every day. Numbers jump around. Look monthly.
- Panicking in week one. New sites can take weeks to show up in Google. That is normal.
Done? You can see who finds you and how. One step left, and it may be the most important one for local customers.
Next: Chapter 12, Google Business Profile
Stuck? CW Dynamic can help
Last checked: November 20, 2026