Switch from Google Analytics 4

Vireo reads your GA4 property through Google's Analytics Data API and stores the history in your WordPress database, in the same tables as the traffic it records itself.

How it works
Reads your property through Google's Analytics Data API
Where
Vireo Analytics, then Settings, then Import & export
Cost
Free. Importers are part of the free plugin.

What carries over

  • Daily pageviews and users
  • Pageviews and users per page, matched to your posts where the path resolves to one
  • Referring sites, by domain
  • Which pages each referring site sent readers to
  • Countries
  • Browsers, operating systems and device types
  • Outbound link clicks by site, and file downloads by file name, where GA4 recorded them
  • Custom events: your own events and form submissions, by name and count

What you need

  • A Google Cloud service account with a JSON key
  • Viewer access for that service account on the GA4 property
  • The numeric GA4 property ID (not the G- measurement ID)
  • The PHP OpenSSL extension on your server

Steps

  1. In Google Cloud Console, create a project or open one you already have.
  2. Under APIs and services, enable the Google Analytics Data API. The older Analytics API is a different one and won't work.
  3. Under IAM and admin, then Service accounts, create a service account. Its address ends in .iam.gserviceaccount.com.
  4. Open the service account, go to Keys, add a key and choose JSON. The file downloads once.
  5. In Google Analytics, open Admin, then Property access management, and add the service account address with Viewer access on the property you want to import.
  6. Copy the property ID from Admin, then Property details.
  7. In WordPress, go to Vireo Analytics, then Settings, then the Import & export tab. Choose Google Analytics, paste the whole JSON key and enter the property ID. Vireo imports every day the property recorded.
  8. Start the import. It works through the history in two-week batches, newest first, and shows progress as it goes.
  9. When it finishes, Vireo removes the saved key. Data already imported stays.

Before you start

  • Imports stop the day before Vireo's own data begins, and the import screen says which day that is, so your imported history ends where Vireo's own counts start. If Vireo lost its own numbers for some days, for example after a data reset, a tick box on the import screen includes those days too.
  • Vireo counts a visitor once per day. For a month, its visitor total is the sum of the daily figures, which reads higher than GA4's users for the same month, because GA4 counts a returning user once across the whole range.
  • Days already imported, from any tool, are skipped, so running the import again adds what's missing.
  • Each run has an "Undo this import" link on the Already imported list. It takes out exactly what that run added, and its days can be imported again.
  • If a run stops partway, start it again to fill in the missing days.
  • The key is stored in your database while the import runs and only used to request your own data from Google. It is removed when the import completes.

After the import

Imported days sit in the same tables as the traffic Vireo records itself, so your charts run straight through from the old tool to the new one. From there, Vireo also shows the Search Console searches that found each post, and what AI crawlers take from your site against the readers AI assistants send back. Bots are kept out of the numbers and listed by category so you can see what was filtered.

Google Analytics 4 is a trademark of its owner. This guide describes Vireo's importer as of October 2026. Google Analytics 4.

Import your Google Analytics 4 history into Vireo

Vireo Analytics is free on WordPress.org and imports from 14 other sources too.

Get Vireo free on WordPress.org

Other switching guides

Compare every import source or see all switching guides