You can add this information to Google Analytics as a Custom Dimension.
First, create the Custom Dimension.
- Navigate to Admin Property: Custom Definitions Custom Dimensions.
- Click +New Custom Dimension.
- Input “Name” as e.g. User Type. Set “Scope” as User. Ensure that “Active” is checked.
- Click Create.
- You will get a dimension Index number when you look at the list of your Custom Dimensions. Record this number.
Then, create a data layer variable:
- With your CMS, add the data layer to your pages where the information on “user type” will be added to the data layer.
- In Google Tag Manager, create a new Variable that will read the value of the data layer variable “user type”
The final step is to enable a custom dimension in your Google Analytics Settings variable that you apply to your Google Analytics tags.
- Click Variables and then click on your Google Analytics Settings variable.
- Click Variable Configuration.
- Click More settings Custom Dimensions.
- Click +Add Custom Dimension.
- Enter the Index value that you captured when you created the new Custom Dimension.
- For Dimension Value, enter the name of the variable that you created, e.g. “user type”.
- Click Save.
- Publish your container for the changes to take effect.
After this you can use the new Custom Dimension to create new segments in Google Analytics based on what type of user is logged into your platform.