Mafujibrahim

Setting Up Custom Dimensions in GA4

Objective:

To configure and implement custom dimensions in GA4 for better data analysis and reporting.

Prerequisites:

  • Access to your GA4 property.
  • Proper permissions (Editor role or higher) in GA4.
  • Access to the website’s code or Tag Manager (if using GTM).

Steps:

  1. Log in to GA4:

    • Go to Google Analytics.
    • Select the GA4 property where you want to set up custom dimensions.
  2. Navigate to Custom Definitions:

    • In the left-hand menu, click on Configure.
    • Select Custom definitions.
  3. Create a Custom Dimension:

    • Click the Create custom dimensions button.
    • Fill in the necessary details:
      • Dimension name: Give a descriptive name for your custom dimension (e.g., “User Type”).
      • Scope: Choose between Event or User based on your requirements.
      • Description: Optionally, add a description for clarity.
      • Event parameter: Specify the parameter that will be used for this custom dimension (e.g., user_type).
  4. Implementing Custom Dimensions on Your Website:

    • Using Google Tag Manager (GTM):
      • Open your GTM container.
      • Create a new tag or edit an existing one.
      • In the tag configuration, choose GA4 Event tag type.
      • Under User properties (for User scope) or Event parameters (for Event scope), add a new row.
      • Enter the parameter name you specified in GA4.
      • Save and publish your changes in GTM.
    • Directly in Website Code:
      • If not using GTM, you’ll need to add the custom dimension directly in your website’s GA4 tracking code.
      • Locate the GA4 tracking snippet in your website’s code.
      • Modify the gtag function to include the custom dimension:

        javascript

        gtag('event', 'event_name', {
        'user_type': 'example_value' // replace with your actual value
        });
      • Save and publish the changes to your website.
  5. Verify the Custom Dimension:

    • Go back to GA4 and navigate to DebugView under the Configure tab.
    • Trigger the event or user action that should capture the custom dimension.
    • Verify that the custom dimension appears in the DebugView.
  6. Using Custom Dimensions in Reports:

    • Navigate to Explore in GA4.
    • Create a new exploration or edit an existing one.
    • Add your custom dimension as a dimension in your report to analyze the data.

Best Practices:

  • Ensure that the names of your custom dimensions are clear and descriptive.
  • Regularly audit your custom dimensions to avoid duplication and ensure data quality.
  • Use the DebugView to verify that custom dimensions are being captured correctly.

Troubleshooting:

  • If custom dimensions are not appear in reports, check the following:
    • Ensure that the parameter names match exactly in GA4 and your implementation.
    • Verify that the GTM container or website code changes have been published.
    • Use the DebugView to trace data flow and identify any issues.

This SOP should help you set up custom dimensions in GA4 effectively. If you encounter any issues or need further assistance, feel free to ask!

Leave a Reply

Your email address will not be published. Required fields are marked *