Tutorials

Custom Dimensions in Web Analytics: A Complete Setup and Implementation Guide

Custom Dimensions in Web Analytics: A Complete Setup and Implementation Guide

Flowsery Team
Flowsery Team
3 min read

TL;DR — Quick Answer

3 min read

Custom dimensions close the gap between raw metrics and meaningful insight by attaching context like subscription tiers, content categories, and user roles to every visit and action in your analytics.

Websites generate an endless stream of behaviour signals each day. Page views, traffic sources, and bounce rates paint part of the picture, yet the deeper story often remains hidden. Campaigns may succeed with one group but fall flat with another, and content that drives strong engagement in one segment may barely register in the next.

Custom dimensions offer a way to capture that missing context by attaching meaningful attributes to visits and actions. Details such as user roles, content categories, or subscription tiers can transform raw activity into insight.

What Are Custom Dimensions?

Custom dimensions are extra pieces of information attached to visits or actions in an analytics tool. Instead of relying only on default fields such as page URL or traffic source, an analyst can store tailored attributes that matter to the business, then use them in reports for deeper insight.

Each custom dimension holds a name and a value. During tracking, the value is sent with the hit, and the analytics platform stores it alongside standard metrics. When reports run, data is grouped and filtered by these values.

For example, a "subscription tier" custom dimension can record whether a visitor is on a Free, Pro, or Enterprise plan. Another might capture "content type," such as article, video, or product page.

Common Use Cases

Content Performance Tracking

Editors can tag visits with content author, category, or content type. Reports then reveal which authors keep visitors engaged, which categories attract new audiences, and whether articles, videos, or product pages drive the most conversions.

User Segmentation

Marketers often track subscription tier, user type, or acquisition channel as custom dimensions. A tier such as Free, Pro, or Enterprise can be followed through funnels to compare feature usage, upgrade rates, and campaign performance.

Ecommerce Insights

Stores can attach product attributes such as brand or collection, along with the customer lifetime value band. That makes it easier to compare groups that spend more or stay longer, without storing personal data.

Technical Tracking

Teams can record a page load time band or an error type. Lining those values up against clicks and conversions shows where slow pages or repeating errors cause visitors to drop off.

Implementing and Managing Custom Dimensions

Step 1: Plan and Create the Dimension

Before creating a new dimension, decide whether it should describe an entire visit (visit-scoped) or a single interaction such as a page view or event (action-scoped).

Because each site has a limited number of slots per scope and dimensions usually cannot be deleted (only deactivated), reserve them for stable concepts such as subscription tier or content group rather than volatile labels.

Step 2: Track Values from the Site or App

For sites that use the JavaScript tracker, custom dimensions are attached to hits through the tracking queue:

_paq.push(['setCustomDimension', 2, 'Pro']);

This call runs before the relevant trackPageView or event, and the analytics platform stores the value alongside the standard metrics.

Tag managers offer another route. A variable captures the value (like a data layer field holding userRole), maps a dimension index to that variable, and sends it with hits when tags fire.

Server-side systems or mobile apps add custom dimensions with dimension{id} parameters, such as dimension2=Enterprise.

Flowsery
Flowsery
Flowsery

Real-time dashboard

Goal tracking

Cookie-free tracking

Step 3: Maintain and Validate

After tracking is live, watch reports and logs for empty rows or odd values. Action dimensions can also take values from URLs or page titles through extraction rules.

Periodic reviews of active dimensions, along with consent and data minimisation settings, help ensure the implementation remains accurate and privacy-friendly.

How Custom Dimensions Affect Reporting

Each dimension appears in dedicated reports where metrics are grouped by the stored values:

  • Visit-level dimensions describe the whole session, so reports summarise complete visits and conversions by each value.
  • Action-level dimensions attach to individual events, page views, or downloads. A single visit can contribute multiple rows, which helps expose detailed patterns.

Custom dimensions can also feed Custom Reports, where analysts add a dimension as a row or column and filter by action type.

Privacy and Compliance Considerations

Under GDPR and similar laws, any field that can identify or single out a person needs a lawful basis, a clear purpose, and suitable safeguards. In practice, this means recording stable, non-identifying values such as subscription tier or an internal segment label instead of names or email addresses.

Data minimisation keeps each dimension tied to a single purpose. Retention rules and deletion processes clear out values once they are no longer needed. Anonymisation and aggregation features help reduce risk further.

Advanced Tips and Best Practices

  • Reserve slots for stable attributes -- avoid ultra-granular values that will bloat tables
  • Avoid high-cardinality values -- timestamps or full URLs with parameters increase archive time and slow reporting
  • Keep names simple and consistent -- labels like "Subscription tier" or "Content category" make reports easier to scan

Troubleshooting Common Issues

  • Data not appearing: Ensure the dimension is active, attached to the correct site, and sent before trackPageView or the relevant event
  • Undefined values: The tracker tried to use a variable that was not defined when setCustomDimension was called
  • Inconsistent formatting: Recording "pro," "Pro," and "PRO" as separate values fragments results -- use shared naming conventions

Was this article helpful?

Let us know what you think!

Before you go...

Flowsery

Flowsery

Revenue-first analytics for your website

Track every visitor, source, and conversion in real time. Simple, powerful, and fully GDPR compliant.

Flowsery

Real-time dashboard

Goal tracking

Cookie-free tracking

Related Articles