Skip to main content
Analytics

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.

TechSEO Editorial Team
TechSEO Editorial Team
Published: July 15, 2026Updated: July 15, 2026
A digital spreadsheet interface displaying custom metric calculations.

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_name when a user reads an article, recording the category_id of a page, or logging the click_url of 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 their login_status, or identifying their customer_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, or stock_status during purchase and add-to-cart flows.

2. Technical Implementation: DataLayer and GTM

Before GTM can capture your custom metadata, you must push it to the dataLayer 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:
  1. Create DataLayer Variables: In GTM, create a new Variable of type Data Layer Variable. Use dot notation to extract nested parameters:
* Set name to dlv - article_metadata.author_id. * Set name to dlv - article_metadata.category_name.
  1. Add Parameters to GA4 Event Tag:
* Open your GA4 Event tag (or Google Tag Configuration). * Under Event Parameters, add rows mapping your desired GA4 keys to your GTM variables: * author $\rightarrow$ {{dlv - article_metadata.author_id}} * content_category $\rightarrow$ {{dlv - article_metadata.category_name}}
  1. Trigger: Fire this tag on the view_article custom 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:

  1. In Google Analytics, click Admin (gear icon in the bottom-left corner).
  2. In the property column, select Custom Definitions.
  3. Click the Create custom dimensions button.
  4. Configure the settings:
* Dimension name: A descriptive name used in your reports (e.g., 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).
  1. 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:

  1. Navigate to Custom Definitions > click the Custom Metrics tab.
  2. Click Create custom metrics.
  3. Set the configuration:
* Metric name: 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.
  1. 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.

TechSEO Editorial Team
TechSEO Editorial Team

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.