How To Set Up Custom Dimension For eCommerce Websites

ecom custom dimension set up with GA4 and GTM

Custom dimensions and metrics provide precisely that. They go beyond the default data collected by GA4, allowing you to create your data points. Whether you’re an e-commerce giant, a content creator, or a local business, custom dimensions and metrics empower you to understand your audience better and make informed decisions.

In this article, we’ll explore what custom dimensions and metrics are, how they work, and how you can leverage them to gain a competitive edge. Buckle up; we’re about to embark on a data-driven adventure!

Custom Dimension in e-commerce websites

Dimension is the attribute of some things
Examples:

·       Page URL: www.google .com

·       Traffic source: google.com, Instagram.com

·       Coupon code: SUMMER20

·       Item category: shoes, t-shirt

·       Country: AUS

·       Page path : /post/abc

Why Custom Dimensions are Useful in E-commerce

Custom Dimensions:

  1. Product Performance Tracking: E-commerce businesses often have a wide array of products. Custom Dimensions allow tracking of specific product categories or brands, providing insights into which ones perform best.
  2. Customer Segmentation: With Custom Dimensions, you can segment your customers based on various factors such as location, age group, or loyalty status. This helps in targeted marketing efforts and personalized user experiences.
  3. Campaign Effectiveness: By assigning Custom Dimensions to different marketing campaigns, you can easily measure their effectiveness. This includes tracking which campaigns lead to the most purchases or engagement.
  4. User Behavior Analysis: Understanding how users interact with your e-commerce site is crucial. Custom Dimensions can track actions like adding items to a cart, viewing specific pages, or completing purchases, giving you insights into user behaviour patterns.
  5. Promotion Tracking: If your e-commerce business frequently runs promotions or discounts, Custom Dimensions can track how these promotions impact user behaviour and sales, helping in future promotional strategies.

How to Create a Custom Dimension with Tag Manager

In this example, we will create a “purchase” event and send the data to Google Analytics 4 where we can create custom dimensions and custom metrics.

Let’s start by creating a tag that sends data to Google Analytics 4

  • After creating a tag in Google tag manager.
  • Click on Tag Configuration from the Tag section.
  • Select the Google Analytics: GA4 Event
  • Now choose the Base GA4 tag
  • To give the event name you need to choose from the recommended events that Google has provided us. or see Events in Google Tag Manager GTM
  • It would help if you gave the ‘Event Name ‘ as ‘view_item’ (which we need to create conversion later)

In the User Property, you need to provide the value from the data layer

Creating Trigger

Now we need to build the trigger that will fire for the tag we created

  • Click on the trigger section
  • Select the plus(+) icon on the top right
  • Now select the Page View
  • Put the ‘page path’ contains /product/
  • Save the changes.

Custom dimension in Google Analytics

From GA4 admin you can select Custom definitions.

Creating Custom Dimension for eCom

To create a custom dimension

  • Click on the Custom Definitions button
  • Give the following name into the fields
    Dimension name: Item View (any unique name that you prefer)
    Scope: Event
    Description: Item viewed by user (any unique name that you prefer)
    Event Parameter: view_item (case sensitive, provide the event name from the tag manager.)
  • Finally, click the Save button.

Custom Dimension Report

After the tag and the custom Dimension have been saved, you need to give 24 to 48 hours to populate the data in Google Analytics, it also depends on the traffic flow of your website.

To see the data you need to select the Explore section in Google Analytics

Choose any Exploration to create a new report

Inside the exploration, you can see there are prefilled Dimensions on the bottom left side of the screen.

Now, you can just Double-click or Drag and Drop the Dimension to use the Dimension data in your report.

To use the custom data, you need to press the ‘plus(+)’ icon and import the custom metrics that you created.

Preview And Publish

After configuring the GA4 tag, use the “Preview” mode in GTM to test its functionality.

  • Browse your website and confirm that the GA4 tag is firing correctly in the GTM preview mode.
  • Once satisfied with the test results, hit “Submit” in GTM to publish the container changes.
  •  Metric will take up to 24-48 hours to populate.

Conclusion

In conclusion, custom dimensions in Google Analytics 4 are not just features; they’re gateways to deeper understanding. By utilizing these tools, businesses can paint a clearer picture of user behaviour, uncovering patterns and insights that drive informed decisions. Whether it’s tracking the effectiveness of marketing campaigns, understanding user engagement at a granular level, or segmenting data for targeted analysis, custom dimensions offer a world of possibilities.

So, whether you’re a seasoned data analyst or just dipping your toes into the world of analytics, don’t underestimate the power of custom dimensions in GA4. Embrace them, experiment with them, and let them guide you toward smarter, data-driven strategies. With custom dimensions, your analytics become not just numbers but a roadmap to success in the ever-evolving digital landscape.