I continued building my stats dashboard in the back office i built… So far I have one base in Airtable, cloud research stats and clockify stat plugins built. My goal is to have separate dashboards for all of my major projects, then have one dashboard where i can see the status of everything I’m building.  Eventually,  i will self host the dashboards and make it so they are only accessible on Tailscale, which I’ve already set up…

Today I spent quite a bit of time building out the analytics side of my ra××××.com back office. My goal was to bring Google Analytics and Google Search Console data directly into the Windows 95-style WordPress back office I have been building, rather than having to constantly jump between different Google dashboards.

I started by working in Google Cloud and setting up a dedicated project for the ra××××.com website statistics system. I enabled the APIs I needed, including the Google Search Console API, and created a dedicated service account for the WordPress dashboard. I intentionally set this up for read-only reporting purposes rather than giving the service account unnecessary control over anything.



I downloaded the service-account credentials so the WordPress system could authenticate directly with Google’s APIs.

Setting Up Search Console

One of the first complications involved verifying ownership of ra××××.com.

I initially tried to get Google’s Site Kit plugin to verify the website automatically, but Site Kit kept reporting that it couldn’t find the required verification token in the site’s HTML. The error suggested that page caching might be responsible.

That was confusing because I don’t have a WordPress caching plugin installed, and I couldn’t find any obvious caching setting at Namecheap that would explain it.

Rather than spending more time fighting the automatic verification process, I switched to DNS verification.

At first, I couldn’t find where to add a TXT record in Namecheap’s normal Advanced DNS interface. I eventually realized that because the domain is using Namecheap Web Hosting DNS, the DNS zone records are actually managed through cPanel.

I went into the cPanel Zone Editor, added Google’s TXT verification record there, and Google successfully verified ownership of ra××××.com.

That solved one of the bigger roadblocks of the night.

Setting Up Google Analytics 4

ra××××.com didn’t previously have Google Analytics configured, so I created the GA4 setup for the site.

I created the ra××××.com web data stream and obtained the identifiers needed by the dashboard, including the GA4 property ID and measurement ID.

The new GA4 property initially reported that data collection wasn’t active, which made sense because the Google tag hadn’t yet been installed on the website.

I pulled up Google’s manual installation instructions and added the Google Analytics tag to ra××××.com. After that, I tested the site and eventually saw myself appear in Google Analytics Realtime.

That was the confirmation I really wanted: the site was actually sending live traffic into GA4.

Connecting the Windows 95 Back Office

Once Google Analytics and Search Console were configured, I connected them to the Website Stats application inside my Windows 95 WordPress back office.

The configuration now includes:

ra××××.com as the site
The ra××××.com Search Console property
The GA4 property
The GA4 measurement ID
The Google Cloud service account
The service-account private key

There was another issue at this stage. The first time I opened Website Stats, it reported:

“Search Console site URL is not configured.”

The connection indicators were also initially showing Unknown, and all of the statistics were zero.

After correcting the configuration and refreshing the application, that changed completely.

The dashboard finally reported:

GA4: Connected
Search Console: Connected

That confirmed that my WordPress back office was successfully communicating directly with both Google services.

Building Realtime Analytics

After getting the basic connections working, I decided I wanted something considerably more interesting than just historical statistics.

I wanted to be able to see people visiting ra××××.com in real time, similar to the Realtime section of Google Analytics.

I added a dedicated Live tab to Website Stats.

The first version actually started pulling realtime information, but it generated a Google Analytics Realtime API error involving `minutesAgo` and `firstUserSource`. Those fields weren’t valid in the way we were attempting to use them with the Realtime API.

Despite that error, some realtime information was already coming through, which showed that the underlying connection was working.

I corrected the API requests and separated the data appropriately instead of trying to force unsupported dimensions into the realtime report.

That removed the red API error completely.

The Finished Live Dashboard

By the end of the night, the Live dashboard was working remarkably well.

I can now see:

Live visitor count — A green indicator in the upper-right corner of the Website Stats window shows how many people are currently on ra××××.com.

Active users during the last five minutes — This gives me a much better approximation of who is actually on the site right now.

Active users during the last 30 minutes — This corresponds more closely with Google’s normal Realtime reporting.

Active pages — I can see which ra××××.com pages visitors are viewing.

Page views — The dashboard distinguishes between the number of visitors and the number of pages they’ve viewed. For example, tonight I could see one visitor who had generated five page views.

Realtime activity graph — I now have a Windows 95-style bar graph showing activity over the previous 30 minutes.

Locations — The dashboard can display the visitor’s country and city when Google has that information available.

Traffic sources — I also added an area for traffic-source information.

The realtime dashboard automatically refreshes every 60 seconds, and it displays the time of the most recent realtime update at the bottom of the window.

One particularly satisfying moment was opening Google Analytics Realtime and seeing one active user, then opening my own Windows 95 dashboard and seeing the same live visitor represented there.

At that point, this stopped feeling like a mockup and started feeling like an actual analytics application.

Where Things Stand

I now have a Website Stats application inside my private Windows 95-style ra××××.com back office with separate sections for:

Overview | Keywords | Pages | Traffic | Live

Google Analytics and Search Console are both connected, and the realtime portion of Google Analytics is already functioning.

Some of the historical sections are still empty because this is a newly configured GA4 property and Google hasn’t accumulated much data yet. Search Console data will also become much more interesting as ra××××.com receives impressions, clicks, and rankings.

There is also a small wording issue in the Traffic Sources area. It currently says there has been no activity in the last 30 minutes even though that particular information is being handled differently from the realtime metrics. I want to change that to something more accurate, such as “No traffic-source data available yet today.”

What I Want to Build Next

The next feature I want to work on is a more detailed Live Visitor Details section.

Instead of simply knowing that someone is on ra××××.com, I’d like my back office to show as much useful realtime information as Google makes available, such as the page being viewed, number of views, city and country when available, and a visual indication that the visitor is still active.

Eventually, I could have something resembling my own miniature Google Analytics Realtime console without ever leaving my private ra××××.com back office.

Today involved quite a few moving pieces—Google Cloud, service accounts, API permissions, DNS verification, Search Console, GA4, WordPress configuration, Google tagging, and debugging the Realtime API—but by the end of the night the entire chain was working.

I can now open my little Windows 95 back office and literally watch activity happening on ra××××.com.

That’s a pretty satisfying place to call it a night.


Discover more from JohnHigginbotham.com

Subscribe to get the latest posts sent to your email.

Author:

Leave a Reply