GA4 Custom Dimensions and Metrics: A Technical Implementation Guide
Learn how to configure user-scoped and event-scoped custom dimensions in GA4 to capture content author, categories, and custom events.

Key Takeaways
- Custom dimensions allow logging metadata not tracked by default GA4 tags.
- Event-scoped dimensions record attributes for specific user interactions.
- User-scoped dimensions capture demographic or customer segment attributes.
Out-of-the-box, Google Analytics 4 (GA4) captures basic interaction data like page views, clicks, and session counts. However, for content-rich websites, tech blogs, and SaaS platforms, these standard metrics fail to provide business-specific insights. You cannot answer questions like: Which author's articles generate the most sign-ups? or Do longer articles result in higher conversion rates?
To answer these questions, you must capture and report on custom metadata. This is accomplished using GA4 Custom Dimensions and Metrics.
1. Understanding Custom Definition Scopes
GA4 structures custom metadata into three distinct scopes. Choosing the correct scope is critical for accurate reporting:
Event-Scoped Custom Dimensions
Event-scoped dimensions describe attributes of a specific action. The value is captured at the moment the event occurs and does not apply to future events.- →Use Cases: Capturing the
author_namewhen a user reads an article, recording thecategory_idof a page, or logging theclick_urlof a navigation link.
User-Scoped Custom Dimensions
User-scoped dimensions describe characteristics of the person interacting with your site. Once set, this value persists across all current and future sessions for that user.- →Use Cases: Tracking the user's
subscription_tier(e.g., free, premium), registering theirlogin_status, or identifying theircustomer_segment.
Item-Scoped Custom Dimensions
Item-scoped dimensions capture details about products inside your e-commerce catalog.- →Use Cases: Recording the
product_size,product_color, orstock_statusduring purchase and add-to-cart flows.
2. Technical Implementation: DataLayer and GTM
Before GTM can capture your custom metadata, you must push it to thedataLayer array from your application code.
Here is an example JavaScript snippet to push article metadata during a page view:
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
event: 'view_article',
article_metadata: {
author_id: 'techseo-editorial-team',
category_name: 'Analytics',
word_count: 1450
}
});
Configuring Google Tag Manager (GTM)
Once the data is in the dataLayer, map it inside GTM to forward the parameters to GA4:- Create DataLayer Variables: In GTM, create a new Variable of type Data Layer Variable. Use dot notation to extract nested parameters:
dlv - article_metadata.author_id.
* Set name to dlv - article_metadata.category_name.
- Add Parameters to GA4 Event Tag:
author $\rightarrow$ {{dlv - article_metadata.author_id}}
* content_category $\rightarrow$ {{dlv - article_metadata.category_name}}
- Trigger: Fire this tag on the
view_articlecustom event trigger.
3. Registering Definitions in the GA4 Admin Panel
Simply sending the parameters to GA4 is not enough. You must register them in the GA4 administration interface to make them available in reports and exploratory dashboards.
graph TD
Site["DataLayer Push (Code)"] --> GTM["GTM Event Parameters"]
GTM --> GA4Rec["GA4 Receives Parameter"]
GA4Rec --> GA4Reg["GA4 Admin Registration<br/>(Custom Definitions)"]
GA4Reg --> GA4Rep["Reports & Explorations"]
Steps to Register a Custom Dimension:
- In Google Analytics, click Admin (gear icon in the bottom-left corner).
- In the property column, select Custom Definitions.
- Click the Create custom dimensions button.
- Configure the settings:
Content Author).
* Scope: Choose Event or User (for authors, choose Event).
* Description: A short note explaining what the parameter tracks.
* Event parameter: The exact parameter key sent by GTM (e.g., author).
- Click Save.
4. Configuring Custom Metrics
While custom dimensions capture text-based attributes, Custom Metrics capture numeric values that you want to calculate, sum, or average.
For example, to track how article length impacts engagement, you can register word_count as a custom metric:
- Navigate to Custom Definitions > click the Custom Metrics tab.
- Click Create custom metrics.
- Set the configuration:
Article Word Count.
* Scope: Event.
* Event parameter: word_count (the numeric parameter pushed to GTM).
* Unit of measurement: Choose Standard (for raw numbers), Time (for seconds/milliseconds), or Currency.
- Click Save.
Official References
Frequently Asked Questions
How do I register custom dimensions in Google Analytics 4?
Go to Admin > Custom Definitions > Custom Dimensions, click 'Create custom dimensions', enter the parameter name, and choose the scope (Event or User).
What are the limits for custom dimensions in GA4?
Standard GA4 properties allow up to 50 event-scoped custom dimensions, 25 user-scoped custom dimensions, and 10 custom metrics.
What is the difference between a custom dimension and a custom metric?
Custom dimensions capture qualitative text-based data (e.g., author names or categories). Custom metrics capture quantitative numeric values (e.g., scroll percentage or word counts).
What is the difference between event-scoped and user-scoped custom dimensions?
Event-scoped dimensions describe specific actions (e.g., download_format). User-scoped dimensions describe the user (e.g., membership_tier) across all sessions.
How many custom dimensions can I create in GA4?
Standard GA4 properties allow up to 50 event-scoped custom dimensions, 25 user-scoped custom dimensions, and 50 custom metrics. GA4 360 properties offer higher limits.
Why are my custom dimensions showing as 'not set' in reports?
This occurs if the custom dimensions were only recently registered (they take 24-48 hours to populate) or if the incoming events do not pass that parameter.

Founder & Editor, TechSEO Insights
The TechSEO Editorial Team writes practical SEO, AI tools, and web development guides based on hands-on research, testing, and real website optimization work.
Subscribe to TechSEO Insights
Get the latest guides on technical SEO, Core Web Vitals, and content marketing delivered straight to your inbox.
Privacy Note: By subscribing, you agree to receive our newsletter (Lawful Basis: Consent). We retain your email address until you choose to unsubscribe. For more details, view our Privacy Policy.


