Model Train-related Notes Blog -- these are personal notes and musings on the subject of model train control, automation, electronics, or whatever I find interesting. I also have more posts in a blog dedicated to the maintenance of the Randall Museum Model Railroad.
2023-07-01 - Conductor 2 w/ Google Analytics 4
Category Rtac
One of the cornerstones of maintaining any automated process, especially daily automated running of little HO-sized trains on a public music model railroad, is to have dashboards to track the status of the automated processes and being able to see at a glance whether they are healthy.
For example this is part of a dashboard that I look multiple times a day:
My dashboards have a few moving parts:
- I use the GA Measurement Protocol to send custom pings using my own Analytics.java in Conductor / RTAC.
- Google Analytics receives the “page views” and the events in a “web” property.
- Looker Studio is used to build the dashboard.
This used to be working very well and I have a lot of dashboards measuring various aspects of the automation, from train runnings, to error rates, including the video display rotation, or the motion detection in the room.
I’m still in the process of updating the Looker Studio dashboards. Updating them to GA4 is not exactly a seamless process. For example in the screenshot above, the “day total” numbers on the right side should not be zeroes.
One main issue I have is that since the Google Analytics Transition to GA4, the GA4 Looker Studio connector does not refresh hourly anymore. Data seems to only be available 12-hours in the past, even when I configure the GA4 connector to “hourly”. I also have a hard time figuring out the timestamp format to use -- by default only hourly dates work in the charts where a few of my charts are at the 15-minute granularity like this wifi status one below:
I was able to replicate that wifi-ping-every-15-minutes in the new GA4 + Looker Studio by sending the timestamp as a custom event property.
Luckily, most of my stats were just hourly, which works well with the new GA4 + Looker Studio -- except before they updated on the hour, whereas now I get them with a 12-hour delay: