Roles are tracked by default
Out of the box, the user roles you assign to people are tracked by Google Analytics as a default setting. It's understandable if you have concerns over how this might affect your site's web traffic numbers, so if reviewing your analytics on a regular basis is an important part of maintaining your web presence, we'll show you how to hide user roles from Google.
Step 1. Add user roles to Google Analytics Module
- In your SiteFarm site, navigate to Manage » Configuration » Google Analytics.
- Click the Custom Dimensions tab to open settings.
- Scroll to the bottom of the settings and click on Browse available tokens.
- Open current user and scroll down to Roles and open the drop-down copy the [current-user:roles] token and paste it in Index number 1 value.
- Click Save configuration to finish.
Step 2. Setting up Google Analytics
- Navigate to the Admin section in Google Analytics and in the center column click on Custom Definitions then click on Custom Dimensions from the drop-down menu.
- Click NEW CUSTOM DIMENSION and add a custom dimension called "User Roles".
- Navigate to Behavior » Site Content » All Pages.
- Click on Secondary dimension to open the drop-down menu, then open Custom Dimensions and select User Roles.
Your output should look like the screenshot below. If so, you’re set up.
Please note: this may take up to a half-hour to update. If you don't see any changes just refresh the browser.
Step 3. Filter by Role Type (optional)
If you would like to filter by certain roles you can use the advanced search feature.
- Click on advanced link located in the upper right part of the screen to open advanced settings
- Click on Page tab highlighted green to open menu options.
- Click on User Roles from the list.
- In the text field enter which role you would like to view then click Apply button.
You will now see that all other roles have been filtered out.