Working with custom metrics¶
Purpose¶
When the standard metrics are not enough, custom metrics come to the rescue. In a nutshell, the process looks like this:
- We create a metric
- We assign the event that will trigger the metric
- We create a report with the metric
Creating a metric¶
To create a new metric, go to the “Settings” section of our system. Select the “Metrics” tab.
The “Status” switch turns the metric on/off.
In the “Name” field, we enter the metric name under which we will see it in reports.
In the “Event type” field, we specify which event the metric will be counted on. You can use CRM deal status change events or a JS event.
Setting up a CRM event¶
To set up a CRM event, the CRM system must already be connected to R7K12.
In the “Event type” field, select “CRM deal reaches a status”.
Then all statuses will be displayed, grouped by event type in R7K12. Select the status you need and save the metric.

Setting up JS¶
If you need to track events that happen on your site (for example, clicking the “Subscribe to newsletter” button), use a JS metric. For the metric to fire, you need to attach the following script to the required event on the site side:
r7k12.push({hit: 'metric',data:{metric:1}})
where “metric: 1” is the number of our metric (“Internal name”).
For example, we have created the following metrics:
For “metric1” the script will be:
r7k12.push({hit: 'metric',data:{metric:1}})
For “metric2” the script:
r7k12.push({hit: 'metric',data:{metric:2}})
Setting up a report¶
To show our metric in a report, create a new report on the “Analytics” tab, or open an existing report for editing and click “Add report metric”.
A window with the available metrics will open. Select your metric and then save the report.