This post was most recently updated on July 31st, 2024
Dimension and Metrics allows you to analyze how users are interacting with content on your site or app. For example in a CMS or an android application, if you want to track user specific visits and hits over a particular page/ button/ level in a game.
Example: Lets implement dimensions and metrics in WordPress to get page views according to user names.
Prerequisite: WordPress setup with some users and pages.
Step1: In your Google Analytics account and go to Admin-> Custom Dimension-> Create custom Dimension
Set the scope to User(because we have to track user activity)
To know what each scope means see Google Analytics- Custom Dimension and Metrics Scope.
Similarly create a custom metric.
Step2: Get the metric/ dimension name and add the following code in header.php file in your current theme to report the analytics.
Step 3: Login to your WordPress site and visit various pages to send the statistics.
Now the questions is where to view the reports and which analytics can be obtained through reports. The next post will show How to generate and use dimension and metric reports?
Note: Mark the dimension and metrics as active when created to receive analytics.