All Systems Operational|support@delhihosting.com
WordPress

How to Add Google Analytics to WordPress

30 Jan 2026 · 4 min read · DelhiHosting Team

You can’t improve what you don’t measure. Adding Google Analytics shows where visitors come from, what they read, and what converts — here’s the safe way to set it up.

Create your property

Set up a Google Analytics 4 property for your site and copy its measurement ID. This is what links your website’s data to your Analytics dashboard.

Connect it to WordPress

The easiest, safest method is an analytics plugin that adds your tracking code correctly and survives theme updates. Alternatively, place the code in your theme header — but a plugin avoids losing it on update.

Check it’s tracking

Use Analytics’ realtime view to confirm visits are recording, ideally from another device. Once data flows, focus on the reports that matter: top pages, traffic sources and conversions.

Quick tips
  • Use a GA4 property and its measurement ID
  • Prefer a plugin over editing the theme
  • Verify with the realtime report
  • Focus on pages, sources and conversions
Key takeaway

Connect GA4 via a plugin so tracking survives updates, confirm it records in realtime, then watch your key reports.

Related WordPress guides

Need a hand with this?

Our Delhi-based engineers set up, secure and speed up WordPress for you — free migration included.