A custom dimension is data about your visitors that you want to assign your visitors. It could be their lead status, membership types or if certain actions they're performed on your website. Or it could be data about their actions like product ratings, levels of stock or the published date of content. The custom dimension data will be shown along your regular view.
The analytics settings are placed the sidebar menu, and there you will find both visit dimensions and action dimensions.
We'll first go through how to create visit dimensions, and then action dimensions.
Click "Add visit dimension" and give it a descriptive name.
Next, select the tracker you use below for further instructions:
Click "Add action dimension" and give it a descriptive name.
If you want, you can add an extraction. Regex can be used to extract the value for the custom dimension from a page URL or title automatically, instead of setting it manually via a tracking client. Note that if multiple extractions are defined, the first extraction that it matches will be used.
If you'd rather set the value manually, click on the tracker you use. Note that dimension values set manually take precedence over extractions.
To start tracking a custom dimension, you need to set the name and the value (what you want to track).
extellio_actions.push([
'setCustomDimension',
customDimensionId = 1,
customDimensionValue = 'Lead'
]);
Once a custom dimension has been set, that value will be used for all following tracking requests which will affect the results. The method will not trigger a tracking request, instead the values will be sent along with the next tracking requests.
For example, if you track a page view the value will be tracked for each following action like a download or clicked outlink etc.
To avoid this, you can delete the value after a tracking request.
extellio_actions.push(['deleteCustomDimension', customDimensionId]);
If you want to track the custom dimension for the first page view, you need to place the method before trackPageView.
extellio_actions.push([
'setCustomDimension', customDimensionId = 1, customDimensionValue = 'Member'
]);
extellio_actions([
'trackPageView'
]);
// extellio_actions.push(['enableLinkTracking']);
// rest of tracking code
If you only want to track the custom dimension for a specific action, you can send one or more specific custom dimension values along with that tracking request. The benefit of using this method is that you don't need to delete the value after the tracking request.
For example, if you want to track a page view you could send
extellio_actions.push(['trackPageView', pageTitle, {dimension1: 'DimensionValue'}]);
Define the dimension value by passing an object defining one or more properties as the last parameter.
Specify all parameters as defined in the method.
The property name for the dimension will be the dimension followed by the ID, for example dimension1. You can set multiple dimension values like this:
extellio_actions.push([
'trackPageView', pageTitle,
{
dimension1: 'DimensionValue',
dimension2: 'Test',
dimension3: 'Value'
}
]);
You can use this function to retrive the value, note that it only works if the dimension was set during the same page load.
getCustomDimension(customDimensionId)
$tracker->setCustomDimension('1', 'dimensionValue');
It accepts the following parameter(s):
It returns a $this value.
You can use clearCustomDimensions() to clear all set dimensions and getCustomDimension() to retrive the value of the custom dimension with the given ID.
To track custom dimensions, you need to send a HTTP request (GET or POST) to your Tracking HTTP API endpoint, for example, https://yourdomain.example/matomo.php with the following query parameters set:
&dimension1=dimensionValue
100,000 actions/month
Standard analytics for most needs. Up to 100 000 actions.
25 heatmap samples/day
Get started with heatmaps & recordings and start seeing things from your users' point of view.
30 responses/month
Start getting to know your users with surveys. Who are they? Why are they on your site?
Immediately after sign-up, you’ll receive a script to install on the website you’ve chosen. The script will only work on the chosen website. Your account won’t contain any data until you install the script. If you’d like to see an example of what it’ll look like when it’s up and running, please sign up for our online demo.
Check your email for an activation link
to complete the registration.