Measuring how visitors arrive and what they do after they land is what turns a WordPress site from a publishing surface into something that can be improved intentionally. Accurate traffic data makes it possible to verify campaign performance, spot content that actually earns visits, and judge whether navigation or conversion changes are helping instead of guessing after the fact.

Google's current WordPress-native path is Site Kit by Google. Site Kit adds the Google tag automatically, connects the site to Google Analytics and other Google services from inside the dashboard, and avoids pasting tracking code into theme files or header snippets that can be lost during theme changes.

Site Kit setup works best on the live public hostname with a healthy WordPress REST API and loopback checks, not on an unpublished staging copy or localhost URL. The initial Google handoff should be done from an administrator account, and many Analytics reports or Site Kit dashboard cards can take 24 to 48 hours to populate even when Realtime is already showing traffic.

Steps to add Google Analytics to WordPress:

  1. Log in to the WordPress dashboard with an administrator account.

    The first Site Kit connection should be completed from an administrator session because it creates the Google service links for the site.

  2. Open ToolsSite Health and review the REST API result before installing Site Kit.

    Continue only when the REST API and loopback tests stop failing on the live site URL, because Site Kit depends on those requests during setup and reporting.

    Localhost, unpublished staging, maintenance mode, password protection, broken proxy headers, or mismatched site URLs can all trigger the failure shown here. Containerized or port-mapped local labs can also fail this test even when wp-admin loads normally.

  3. Open PluginsAdd Plugin, search for Site Kit by Google, then click Install Now.

    Site Kit is Google's supported plugin path for connecting Analytics from the WordPress dashboard.

  4. Click Activate after the plugin package finishes downloading.

    Activation adds the Site Kit menu to the admin sidebar and opens the setup entry point.

  5. Open Site KitDashboard, keep Connect Google Analytics as part of your setup selected, then click Sign in with Google.

    If the Analytics checkbox was skipped during the first pass, connect it later from Site KitSettingsConnect More ServicesAnalyticsSet up Analytics.

    Localhost, unpublished staging URLs, or development copies can stop here with a staging warning or a development sites not supported error instead of the normal Google handoff.

  6. In the Google handoff, sign in with the Google account that should own the site, approve the requested permissions, then choose or create the Analytics account, Google Analytics 4 property, and web data stream before clicking Configure Analytics.

    Site Kit returns to the WordPress dashboard after the handoff completes. If the selected property already has data, Site Kit can show it right away; otherwise it will note that Analytics is gathering data.

  7. Open the public site in another tab, browse a few pages, then check the property's Realtime report to confirm traffic is arriving.

    Realtime is the fastest validation path after setup. Many standard Analytics reports and Site Kit dashboard cards can still take 24 to 48 hours to process fresh data.