Vireo reads your history straight from Google’s Analytics Data API. You need a service-account key file and your property’s numeric ID.
What comes across
Daily pageviews and visitors, your pages, your referrers and which pages each one sent readers to, countries, devices, outbound clicks, downloads, form submissions and your own custom events.
Sessions, conversions and the events Google Analytics collects on its own (page views, scrolls, session starts) don’t come across.
Get the key file
In Google Cloud Console:
- Create a project, or open one you already have.
- Under APIs and services, enable the Google Analytics Data API. The plain Analytics API is a different one and won’t work.
- Under IAM and admin, then Service accounts, create a service account. Its address ends in
.iam.gserviceaccount.com, and you need it for the next part. - Open the service account, go to Keys, add a key, and choose JSON. The file downloads once and Google won’t give it to you again.
If you’ve already connected Search Console, you can reuse the same service account. Enable the Analytics Data API on its project too.
Give it access in Google Analytics
- Open Admin, then Property access management, and add the service account’s address with Viewer access. Grant it on the property you want to import, not on the account.
- Find your property ID under Admin, then Property details. It’s digits only, not the G- measurement ID.
Run the import
- In WordPress, go to Vireo Analytics, Settings, Import & export, and click “Import from Google Analytics 4”.
- Open the key file in a text editor and paste all of it, braces included, into “Service account key (JSON)”. Enter the “Property ID”.
- Set the Start date and End date you want, and click “Start import”.
The progress bar shows each batch as it lands.
The key stays in your database and is only used to ask Google for your own data. Once the import is done, “Remove the saved key” deletes it. That doesn’t affect anything already imported.
If it stops partway
Importing the same dates twice adds the numbers twice, and that can’t be undone. If a run stops, narrow the range to what’s missing rather than starting again from the beginning.
If Vireo already has its own numbers, the import stops the day before they begin. See How importing works.
If the screen says OpenSSL is missing
Vireo needs PHP’s openssl extension to sign in to Google. Ask your host to enable it.
In depth
The Google Analytics switching guide compares what Google Analytics reports with what Vireo keeps.