I want to track the number of page views per author.
I’ve created the custom dimension
article_author
in GA4 using scope: event and parameter: author I initially had it set to content and realized that there was a more accurate selection. I added the proper gTag to mysite.gtag('event', '
', { '
page_view
article_author
': 'AUTHOR NAME' });โI can see in GA4 if I click to the
report snapshot EVENTS IN LAST 30 MINUTES panel shows my data with the 5 authors and I can seethe last 30 min of page views. This is the exact report I want but I want weekly and monthly reports.
page_view
When I go to reports or the explorer and set the report up under the “
article_author
” dimension all i see is (not set), I’ve be capturing data for 24hours. I can see it in the overview report panel..Details
Reporting
The short answer is:
The discrepancy between the real-time data and the standard/Exploration reports in Google Analytics 4 is caused by the custom dimension’s scope.
While your event-scoped article_author
dimension correctly appears in real-time event snapshots, it won’t populate standard reports (like Reports or Explorations) for non-event dimensions like a user’s page view count, leading to (not set).
The fix is to recreate the custom dimension with the User or Item scope if you want to apply it to session or user-level metrics, but for page views per author, you should simply rely on the event scope and use the Google Analytics Data API to construct the precise weekly and monthly reports you need.
This API allows programmatic access to the data, bypassing the limitations of the GA4 UI’s fixed reports and enabling robust reporting in tools like Looker Studio or your own application, which is far more cost-effective than building a custom data warehousing solution from scratch.
The long answer is:
Your problem is a common point of confusion when working with custom dimensions in Google Analytics 4, and it fundamentally relates to how scope impacts data processing and reporting.
You are correct in using the event scope for your article_author
dimension with the
event.page_view
The fact that the data appears correctly in the Real-time Report and the EVENTS IN LAST 30 MINUTES panel proves your implementation of the gtag is correct and the data is flowing into GA4.
The reason you see (not set) in standard and Exploration reports is due to how GA4 processes and aggregates custom dimensions for different report types.
While an event-scoped dimension is available for event-specific reports, the GA4 UI’s standard reports may not always align the data with the event, especially if the report template is built on a different scope, causing the dimension value to be unavailable, thus showing (not set).
The 24-hour delay in GA4 processing for custom dimensions can also contribute, but the scope is the primary hurdle for long-term reporting.
To achieve the precise weekly and monthly page view counts per author, the most technical, actionable, and cost-effective solution is to use the Google Analytics Data API.
The GA4 interface, especially with its predefined reports and sampling thresholds, is not built for complex, custom aggregation on event parameters.
The Google Analytics Data API allows you to programmatically request the exact dimensions and metrics you need.
Specifically, you would query the API using the article_author
dimension and the screenPageViews metric (or eventCount for
events) for your desired date ranges, allowing you to bypass the restrictive UI limitations and get the raw, processed data.page_view
This solution is exceptionally cost-effective because the Google Analytics Data API has generous daily limits and is free to use for most use cases, eliminating the need for paid cloud resources or expensive third-party tools.
For enhanced visualization and sharing, you could use the same API to push this data directly into Looker Studio, allowing you to build custom, dynamic dashboards that precisely filter and visualize your author performance metrics without ever encountering the (not set) issue again.
Furthermore, for a robust, permanent data warehouse solution, you could also integrate with the BigQuery API to export your raw GA4 event data, allowing you to run complex SQL queries against your event data for the ultimate reporting flexibility and granularity, which is free up to a certain data volume.