@zawadzinski opened this Issue on July 8th 2008 Contributor

This feature is important to web marketers and to a web analytics solution in general. The user should be able to select two periods to compare in the Piwik UI. The graphs, tables, sparklines, texts, would show values for both periods as well as the % of evolution.

@mattab commented on February 9th 2010 Member

Attachment: Table for pages
mockup 5 pages table.png

@mattab commented on February 9th 2010 Member

Attachment: Table for referers
mockup 5 Referers table.png

@mattab commented on February 9th 2010 Member

Attachment: Standard table
mockup 5.png

@mattab commented on February 9th 2010 Member

Attachment: Sparklines
sparklines.png

@mattab commented on February 9th 2010 Member

Attachment: Calendar mockup
mockup1 calendrier.png

@mattab commented on June 25th 2012 Member

Attachment:
compare periods nice ui.png

Related to comparing segments https://github.com/piwik/piwik/issues/7716 since both would use same mechanism

@anonymous-piwik-user commented on May 28th 2009

Hi, I have working on a Piwik for a few weeks and my project needs a period compare mode. Even if this feature is planned after V1, nobody has post on this ticket.
Did anybody work on it? And what is the progress? Could I help to develop the feature since I quickly need it?

@mattab commented on May 29th 2009 Member

nobody is working on it.

The best way if you would like to contribute this back to core, is to post here your specification of what you want to do and how you are planning to do it, and we might be able to review and help you out. This is not a trivial task so it requires careful planning. that would be great new feature though

@mattab commented on March 2nd 2011 Member

This feature might be picked up soon as requests are increasing. If you are interested in sponsoring the feature, please contact us at services at piwik.org

Note that the code in the branch cannot be reused, but definitely a good place to look at for ideas on how to implement this the easiest way.

@mattab commented on March 4th 2011 Member

Comparing 2 reports together is useful for dates, but also to compare visitor segments (eg. All visitors VS Visitors coming from Adwords) - see #2135

@mattab commented on November 8th 2011 Member

See this example to integrate "Time comparisons" in a table: http://www.shufflepoint.com/assets/slides/267_prr.png

But a green/red indicator might be as good or better than 2 horizontal lines per row...

This would be used

  • In all tables in the UI when comparing 2 periods
  • In the PDF/Email reports by default (compared to N-1 period)
@Japhys commented on August 10th 2017

Is this something we can expect in the future? I really would like to have this feature! I switched from GA to Piwik on a site with millions of visitors a month, I really miss the ability to compare monthly and quarterly reports in a quick and easy way

@mattab commented on September 18th 2017 Member

Yes, we hope to implement this feature in the future. If your company can sponsor this change, it would certainly help make it happen faster :+1: https://piwik.org/development/

@tsteur commented on January 24th 2019 Member

Unassigning myself for now as I'm not sure when I find time to work on it again. Started work on it here: https://github.com/matomo-org/matomo/compare/5711

Done so far:

  • For regular data tables support date1=&period1= for date comparison, as well as &segment1=...&segment2=&segment3=&segment4= for segment comparison. both can be used together
  • Adjusted date selector to support comparisons (not fully finished eg compare date needs to adjust automatically depending on selection of comparison period and selected period etc)
  • When comparing data, we automatically flatten the data (at least for now)... maybe some reports want to define different behaviour and only work on first row level data (eg acquisition websites, etc)
  • Data structure looks like
    • Label1
      • Date1 (present if comparing date)
        • Segment1 (present if comparing segment)
        • Segment2 (present if comparing segment)
      • Date2 (present if comparing date)
        • Segment1 (present if comparing segment)
        • Segment2 (present if comparing segment)
    • Label2
      • ....

To be done:

  • Add comparison selection to segment selector: We would only allow to compare to other already created segments
  • In API response I currently set the segment expression in the API output as label but would need to show ideally the segment name if the segment expression is found
  • Need to automatically expand all rows in html table when comparing data? not sure...
  • Define how API output could look like when using simple datatable (sparklines, evolution graph)
  • Support comparison for bar, pie, ... charts
  • Support comparison for evolution graphs
  • Support comparison for sparklines
  • Support comparison ideally in row evolution
This Issue was closed on September 30th 2019
Powered by GitHub Issue Mirror