Skip to content

How to Add Google Analytics to Your Kenyan Website

Add Google Analytics – technology event in Sandton, Johannesburg, South Africa
Photo: Slippery slope302, CC BY 4.0, via Wikimedia Commons

You built a website for your business. Maybe you paid someone in Nairobi’s CBD to design it, or maybe you put it together yourself over a weekend. Either way, there’s a good chance you have no idea who’s actually visiting it, where they’re coming from, or what they do once they land on your homepage. That’s what Google Analytics fixes, and setting it up takes about fifteen minutes.

Why bother with Google Analytics

Think of it this way: if you ran a shop in Westlands, you’d notice how many people walked in, which shelves they browsed, and whether they left without buying. A website without analytics is a shop with no one watching the door. You could be getting fifty visitors a day from Kisumu who all leave within ten seconds, and you’d never know why your M-Pesa till isn’t ringing.

Google Analytics is free, and it tells you things like which pages people spend time on, whether they’re on phones or laptops, what percentage bounce straight off your site, and which of your marketing efforts (Facebook ads, WhatsApp shares, Google searches) are actually sending you customers.

Advertisement

Step 1: Create your Google Analytics account

Go to analytics.google.com and sign in with a Gmail account — ideally a business one, not your personal account, so you don’t lose access if an employee leaves. Click “Start measuring” and give your account a name, usually your business name.

You’ll then set up a “property,” which represents your website. Enter your business name, select Kenya as your reporting time zone and KES as your currency (this matters if you’re tracking e-commerce sales), and fill in basic details about your industry and business size.

Step 2: Get your tracking code

Once your property is created, Google will generate a “Measurement ID” that looks something like G-XXXXXXXXXX. This is the code that connects your website to your analytics account. You’ll also get a small snippet of JavaScript code — this is what actually does the tracking.

Step 3: Install the tracking code on your site

How you install this depends on your platform:

  • WordPress: Install a plugin like “Site Kit by Google” or “Insert Headers and Footers,” then paste your tracking code into the header section. Site Kit is easier because it connects directly to your Google account without manual copying.
  • Website builders (Wix, Squarespace): Look for a “Tracking & Analytics” or “Integrations” section in your site settings and paste the Measurement ID there.
  • Custom-built sites: Paste the JavaScript snippet just before the closing </head> tag on every page you want tracked.

If you’re not comfortable editing code yourself, this is exactly the kind of small job your hosting provider or web developer can do in a few minutes. If your site is hosted through Buy Domain Kenya’s hosting plans, our support team can point you to the right file or plugin for your setup.

Advertisement

Step 4: Confirm it’s working

Go back to your Google Analytics dashboard and open the “Realtime” report. Then open your website in a new browser tab. You should see yourself show up as an active user within a minute or two. If nothing appears, double-check that the code is on every page and that you haven’t accidentally installed it twice (which causes double-counting).

What to actually look at once it’s running

New site owners often install Google Analytics and then never open it again. Don’t be that person. Check in weekly and pay attention to a few numbers:

  • Traffic sources — are people finding you through Google search, social media, or direct visits? This tells you where your marketing is working.
  • Bounce rate — if most visitors leave within seconds, your homepage might be slow, confusing, or not matching what they searched for.
  • Top pages — which pages get the most attention? Double down on what’s working.
  • Device breakdown — in Kenya, the vast majority of web traffic is mobile. If your site isn’t mobile-friendly and most visitors are on phones, that’s a red flag worth fixing immediately.

A quick privacy note

Since Kenya’s Data Protection Act requires transparency about how you collect visitor data, make sure your website has a privacy policy that mentions you use Google Analytics for tracking. It doesn’t need to be complicated, just honest about what you’re collecting and why.

Once you’ve got a domain and hosting sorted through a checker like the one on Buy Domain Kenya, adding analytics is one of the cheapest, fastest ways to start making decisions based on actual visitor behavior instead of guesswork. Fifteen minutes of setup now saves you months of wondering why your website isn’t converting.

Advertisement

Leave a Reply

Your email address will not be published. Required fields are marked *

Chat now