Adding simple in-place metric


#1

I’ve already asked this question on stackoverflow today, before finding this forum: http://stackoverflow.com/questions/29339362/add-metric-calculated-from-existing-metrics It seems suitable to post it here again:

I use Piwik 2.12. and would like to add another metric. The FAQ tells me how to track custom variables, but I don’t think this is what I need. There is probably a simple way to do what I want to achieve.

I would like to show a graph for

X = (1-bounce_rate)*unique_visitors

Here X only depends on the same day-values of bounce rate and unique visitors. To me this is the number of users who spend “quality time” with the site - they are unique and look at more than 1 page.

Could someone point me to an example or to a location in the source code where I could do this with minimum changes?


#2

I’m interested in this topic too.
I need to add a custom metric that counts the number of unique vistors (and not unique visits) that visited a page or a download.

I already checked all the documentation about creating custom plugins and reports but I didn’t find anything about custom metrics, apart from the fact that a plugin can use its own metrics (in Archive Data).

How could I do it?

Thank you in advance