How to Set Up Google Analytics on Your Website
Google Analytics 4 setup takes about 15 minutes. Here's the exact process — from creating your account to confirming data is coming in.
2 min read · Updated 2026-05-10
Short answer
Go to analytics.google.com, create an account and property for your website, copy the Measurement ID (starts with G-), add it to your website (via tag, plugin, or code), and wait 24 hours for data to appear. The hardest part is adding it to your site — the method depends on your platform.
Step 1: Create your GA4 account
- Go to analytics.google.com and sign in with your Google account
- Click "Start measuring"
- Enter an account name (your business name)
- Create a property — give it your website name and select your time zone and currency
- Choose "Web" as your platform
- Enter your website URL and stream name
You'll get a Measurement ID (format: G-XXXXXXXXXX). This is what you'll add to your site.
Step 2: Add GA4 to your website
The method depends on your platform:
WordPress — install the free "Site Kit by Google" plugin. It connects GA4 with one click and no code.
Squarespace — go to Settings → Advanced → External API Keys → Google Analytics, paste your Measurement ID.
Wix — go to Settings → Tracking & Analytics → New Tool → Google Analytics, paste your Measurement ID.
Shopify — go to Online Store → Preferences → Google Analytics, paste your Measurement ID.
Custom site (HTML) — paste the GA4 tracking code snippet in the <head> section of every page. The snippet is in GA4 under Admin → Data Streams → your stream → "Google tag."
Google Tag Manager — if you're already using GTM, add a GA4 Configuration tag with your Measurement ID and trigger it on "All Pages."
Step 3: Confirm it's working
Install the "Google Analytics Debugger" Chrome extension, visit your website with it active, and check GA4 → Reports → Realtime. If you see your visit showing up, it's working.
Data takes 24–48 hours to start appearing in standard reports.
What to set up after the basics
- Mark conversions — in GA4, go to Events and mark phone clicks, form submissions, or purchases as conversions
- Connect Search Console — links GA4 to your Google Search Console data
- Set up goals — helps GA4 measure what matters to your business
Related questions
Free SEO checklist
Grab our free Small Business SEO Checklist — a step-by-step guide to ranking your site higher.