No matter what type of membership site you operate, analytics on what your visitors and members are consuming most can be a huge asset for your marketing and development efforts.

This article will show you how to track “Membership Level” as a custom dimension in Google Analytics by leveraging a WordPress analytics plugin and a custom code recipe (below). Once configured, you will be able to create a custom report in Analytics to show Top Content for non-members and for specific membership levels. Boom.


Configure a new Custom Dimension in Google Analytics

Custom dimensions and custom metrics are like default dimensions and metrics in your Analytics account, except you create them yourself. You can use them to collect and analyze data that Analytics doesn’t automatically track.
—via Custom Dimensions & Metrics at Google

Custom Dimensions must be configured for the desired website property in your Analytics dashboard. To track Membership Level as a Custom Dimension, you will need to do the following:

  1. Log in to your Google Analytics Dashboard.
  2. Select the property you would like to manage.
  3. Navigate to the “Admin” management screen and select “Custom Dimensions” under the “Property” column (middle).
  4. Click “+ New Custom Dimension”.
  5. Name your dimension “Membership Level”, and set the “Scope” to “Hit”.
  6. Save Settings.

Custom Dimension for Membership Level in Google Analytics

After the dimension has been created, take note of the “Index” (a numerical value that you will need for the later steps in this guide.

Custom Dimension Index for Membership Level in Google Analytics


Option 1: Using Google Analytics Dashboard for WP by ExactMetrics (Free)

Formerly known as GADWP, this WordPress plugin adds the Google Analytics tracking code and allows you to view key stats right in your site’s dashboard. The plugin offers additional features to customize tracking for your site’s needs, which is what this demo is all about. Installation and setup instructions for this plugin are available in the repository listing here.

Once you have setup the plugin and created the Custom Dimension in your Analytics property, you must add the following code recipe to your site using a plugin for PMPro Customizations. This recipe uses the gadwp_analytics_commands action hook to configure a new tracked dimension with the Index “1”. Your index may be different depending on how the dimension was set up in the web property. You will need to update line 22 of the recipe with your dimension’s appropriate index (i.e. dimension3).

The Code Recipe


Option 2: Using MonsterInsights Pro and the MonsterInsights – Dimensions Addon (Premium)

When writing these tutorials, I always try to make the customization possible without the need for a premium plugin. If you are already using MonsterInsights or need any of the added features of this premium system, this second method is for you. You can explore current features and pricing of MonsterInsights at their site to help you decide if this plugin is a better fit than the option above.

As in option 1, you will need to configure the MonsterInsights plugin, create the Custom Dimension in your Analytics property, and also install and activate their Custom Dimensions Addon.

The following code recipe will add a new “Membership Level” dimension in the settings page of the MonsterInsights Pro plugin. Once the recipe has been added to your site using a plugin for PMPro Customizations, do the following:

  1. Navigate to “Insights” > “Settings” > “Tracking” > “Custom Dimensions”.
  2. Click “+ Add new custom dimension”.
  3. Select “Membership Level” from the dropdown.
  4. Enter the correct “Index” as it was configured within your web property in Google Analytics.
  5. Save Changes.

Configure Membership Level as a Custom Dimension in MonsterInsights


The Code Recipe


Setting Up Some Saved Reports

Now that have set up your Custom Dimension tracking, you can head over to your Analytics dashboard and create some saved reports to make it easy to access this data.

For my membership site, Paid Memberships Pro, I am primarily tracking the top content accessed by “Non-Members” (dimension value no_level) as well as a separate report of the top content accessed by members of our free level (dimension value 7 which is the Level ID of our Free membership).

These are the two reports that tell me the top post I can work on to increase conversion rates as well as the most popular members-only posts that free or non-members would like to have access to.

Here’s what I did once the dimension tracking was in place and I confirmed it was all set up properly:

  1. Log in to your Google Analytics Dashboard.
  2. Select the property you would like to manage.
  3. In the sidebar, select “Behavior” > “Site Content” > “All Pages”.
  4. In the filter and search area below the graph, there is a link to perform an “advanced” search. Click the work “advanced”.
  5. Select “include”, Custom Dimension: “membership_level”, “Exactly matching” the ID of your membership level OR the exact string no_level.
  6. This will generate a custom report for the selected level/non-members.
  7. Click “Save” in the upper right chart area to save this custom view for easy access.

membership_level filtered report in Google Analytics Page Content area

Saved reports can be accessed at a later time via the sidebar “Customization” > “Saved Reports” screen.

You can add additional saved reports for as many custom searches as you would like. Here are the four custom reports I have set up for our site:
Saved reports in Google Analytics


Put it to work for you.

I hope you’ve enjoyed (and been able to follow along with) this somewhat advanced tutorial. Whether you have a highly active membership site or are just getting started, it is very smart to get this tracking in place from the beginning. The data will only start tracking from the point of set up and on, it can’t update existing data.

Let me know in the comments below how everything is working out for your site. If you are using any other custom analytics for your membership site, please share!


Leave a Reply

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