Metrics
A metric turns an event into the number a test is judged on: whether visitors did it, how often, or what a number it sends adds up to.
List metrics
Returns the project's metrics, oldest first, each with its event and the number it reads.
Create a metric
Turns an event into a number a test can be judged on. The event must exist first: create it with Create an event. Needs an `editor` or `publisher` key.
Get a metric
Returns one metric, with its event and the number it reads.
Update a metric
Changes the fields you send. The result is checked as a whole metric, so a change that leaves it inconsistent is refused: to switch a `value_per_visitor` metric to `unique_count`, send `event_parameter: null` in the same call. Fields you leave out keep their values; send a field as `null` to clear it. Needs an `editor` or `publisher` key.
Archive a metric
Archives the metric. Nothing is removed: every test already judged on it keeps it, their reports read the same as before, and the name stays taken.
Restore a metric
Puts an archived metric back on offer, so a new test can be judged on it again. Does nothing to a metric that is already active.