Tracking Custom Dimensions via Matomo Tag Manager
If you are already using Matomo Tag Manager – which we recommend doing – then this is the easiest way to configure the tracking of Custom Dimensions.
-
Install & Configure Matomo Tag Manager.
-
Create Variable that captures the data you’d like to use in your Custom Dimension
- For example, you might capture a Username with a Data Layer Variable
- Or capture an article’s Publishing Date with a DOM Element Variable.
-
To link new Matomo Variables with a Custom Dimension, you can use the pre-configured Matomo Configuration Variable. Whilst editing your configuration, find the Custom Dimensions section and add your dimension ID number to the Index field, and your newly created variable to the Value field. Note: You can find your Custom Dimension ID on the Custom Dimensions page inside your Matomo Settings area accessed via the cog icon .
-
Save your configuration and optionally click to Preview / Debug your container.
-
If everything is worked as expected, then you can safely Publish your container.