1. Courses
  2. AI Engineering
  3. Run and Grow Your Site
  4. Stop 3

25 minBeginner

Analytics, Search Console and your sitemap

You can't grow what you can't see. This lesson connects Mangrove Kitchen to Google Analytics and Google Search Console, publishes a sitemap so Google finds every recipe, and shows you how to read the first reports without drowning in numbers.

By the end you can

  • Set up a Google Analytics property and add its tag through your agent
  • Handle consent for visitors who need to give it
  • Verify your domain in Search Console with a DNS record and submit a sitemap
  • Read impressions, clicks, CTR and position, and pick one change a week

The everyday picture

A shopkeeper wants two kinds of facts. Inside the shop: how many people came in, which shelves they looked at, where they came from. Outside: how often the shop appears on the city map, and how many people walked over from it.

Google Analytics is the counter inside your shop. Search Console is the report from the map maker, Google Search. And a sitemap is the floor plan you hand the map maker, so no room is missed.

Google Analytics: counting visits

(GA4) counts visitors, pages viewed and where people came from. You create a property for the site and a web data stream for your domain, and Google gives you a starting with G-. The ID is public by design, so it can go in NEXT_PUBLIC_GA_ID. Your agent then adds the tag; Next.js has an official Google helper for it.

Visitors in the EEA, the UK and some other places must agree before analytics cookies are set. Google's lets the tag wait for the answer from a consent message. The same consent tool will handle ads in rg-04, so set it up once.

Visitor Consent message accept decline Tag sets cookies full page views No cookies basic pings only GA4 reports
With Consent Mode the tag asks first. Visitors who accept are counted in full; visitors who decline get no analytics cookies, so their visits show up only partly in the reports.

Quick check

Your agent asks whether the G- Measurement ID must be kept secret like the Supabase secret key. What do you answer?

Loading the rest of the lesson…