Beginning November 1st I started seeing that a custom metric, unique pageviews, I had implemented on some sites was way out of whack. Basically more than double the value it should be.
Specifically it seemed like a problem with the metric being aggregated, not the firing of the event itself. Literally the event data looked good. Here we can see in Looker Studio the metrics them stacked on top of each other.
On top is number of unique pageview events (which I believe are correct) and below that is the metric itself, which is way too high. These should be the same. The reason we need the metric is so we can tie the event to page paths and also have referrer info for the session.
Because the event data still looks good, we can still get accurate unique pageviews for a period of time by hostname and page, just putting it side by side other metrics isn’t really possible (though maybe it could be fixed with a calculated field?).
Whatever.
Then I found this on Google support. https://support.google.com/analytics/answer/9164320?hl=en#110223
Why Google Why???
So it turns out in Tag Manager, I had the unique pageviews fire on a custom "unique pageview" event. The problem with that is that was firing before the main GA4 tag fired, so it was now sending automatic events along with it, inflating first_visit and session_start.
So I replaced the custom event with the "All Pages" trigger and that seems to have resolved the issue as it now fires after the main container/page view event occurs.
Comments