Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Add Loyalty report "Visitors who visited the website 1 time, 2 times, etc." #536

mattab opened this Issue · 8 comments

3 participants

Matthieu Aubry Benaka Julien Moumné
Matthieu Aubry
  • Loyalty: M people visited N times


  • [Recency Frequency Monetary](
  • [I Got No Ecommerce. How Do I Measure Success?](

We probably need to keep track of the count of visits for each visitor in a new table, to be able to tell this stat on more than 1 day range.

Matthieu Aubry

Moved Recency report requirement in #583

Matthieu Aubry

This is also easy to implement now, because log_visit contains the field piwik_log_visit.visitor_count_visits which is the count of visits. This is set using the first party cookies counter. We can therefore query GROUP by this field and get the report.

The GA breakdown is as follows:

Count of visits from this visitor including current Visits that were the visitor's nth visit Percentage of all visits

Count of visits from this visitor including current     Visits that were the visitor's nth visit
1 times     179,528.00  
2 times     16,412.00   
3 times     6,006.00    
4 times     3,389.00    
5 times     2,371.00    
6 times     1,819.00    
7 times     1,469.00    
8 times     1,236.00    
9-14 times  4,590.00    
15-25 times     3,997.00    
26-50 times     3,880.00    
51-100 times    2,665.00    
101-200 times   958.00  
201+ times  1,481.00    

We can reuse the same breakdown as it is relevant and consistent. See also similar #584, #2031


Got a question about this issue: where would this specific report be placed? Thanks in advance.

Matthieu Aubry

where would this specific report be placed?
I would say Visitor > Engagement report page (already built using 2 plugins outputs).

Matthieu Aubry

(In [5378]) Fixes #584, #536, #2031 - Kuddos to Benaka akka capedfuzz for this great patch!!! I did a few minor modifications in wording and metadata output

  • Add Report "Visits by visit number" under Visitors > Engagement
  • Add Report for all Goals (including ecommerce): "Visit until Conversion": number of visits until the conversion occured
  • Add Report for all Goals (including ecommerce): "Days until Conversion": days since the first visit


  • These new reports are also in the Metadata API so should be displayed in Piwik Mobile, and can be exported in the Scheduled reports.
  • filter_only_idgoal now renamed as idGoal for consistency
  • refactored the "Beautify labels" for ranges in generic filters
  • refactored archiving code to process multiple reports in one generic SQL query
Julien Moumné

It seems Visitors > Engagement > "Visits by visit number" column titles are not clickable/sortable, is it by design ?

The other two reports are ok.


I disabled sorting for that report since the other two VisitorInterest reports also disable it. I don't know if this is the desired behavior, but I could make some changes when I submit a patch for #583 (shouldn't be too long now...).

Matthieu Aubry

Milestone 1.8.x Piwik 1.8.x deleted

Matthieu Aubry mattab added this to the 1.12.x - Piwik 1.12.x milestone
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.