Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VisitFrequency API: read pre 2.0 data #4878

Closed
mattab opened this issue Mar 20, 2014 · 19 comments
Closed

VisitFrequency API: read pre 2.0 data #4878

mattab opened this issue Mar 20, 2014 · 19 comments
Assignees
Labels
Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical. Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change.
Milestone

Comments

@mattab
Copy link
Member

mattab commented Mar 20, 2014

in VisitFrequency API in 2.0 we started processing data for a segment:

const RETURNING_VISITOR_SEGMENT = "visitorType%3D%3Dreturning%2CvisitorType%3D%3DreturningCustomer";

In pre 2.0 it used to be recorded as metrics in the VisitFrequency plugin archives.

Let's add a few lines of code to read the data from pre-2.0 format, when the $date is earlier than Dec 17th (date of 2.0 release)

This is a follow up of the change in a701d4a

@mattab
Copy link
Member Author

mattab commented Mar 24, 2014

Attachment: I think incorrect fix :(
Fixes_#4878_Read_the_old_data_first__This_is_only_a_partial_fix.patch

@mattab
Copy link
Member Author

mattab commented Mar 26, 2014

The complicated thing is to deal with cases where the data spans across multiple days or weeks or months. In this case the API must both select the old data and the new one and then merge these two datasets into the returning datatable.

@diosmosis
Copy link
Member

In 6db8dea: Fixes #4878, use pre-piwik 2 data in VisitFrequency API if post-piwik 2 data cannot be found. Commit includes commented out tests for changes.

@mattab
Copy link
Member Author

mattab commented Mar 26, 2014

build is failing, reopening

@mattab
Copy link
Member Author

mattab commented Mar 26, 2014

I have tested as follows:

  • install 1.12
  • generate data, and archive
  • check that there are returning visits in Visitors>Engagement
  • Delete all logs
  • upgrade the DB to 2.1.0
  • open Visitors>Engagement

What I see:

  • Metrics are displayed below the graph
  • The graph has no value
  • The sparklines are flat

See attached screenshot.

can you reproduce?

@mattab
Copy link
Member Author

mattab commented Mar 26, 2014

@mattab
Copy link
Member Author

mattab commented Mar 26, 2014

In 99319ec: Refs #4878 typos @diosmosis please add integration test triggering this code path

@mattab
Copy link
Member Author

mattab commented Mar 26, 2014

In 1ff6595: Refs #4878 Fix error addPrePiwik2DataIfMissing not defined

@diosmosis
Copy link
Member

In 8dfafd8: Refs #4878, fix bug in VisitFrequency.addPrePiwik2DataIfNewDataAbsent and add test for multiple periods w/ pre Piwik 2 VisitFrequency data.

@diosmosis
Copy link
Member

Tested w/ updated piwik 1.12 install, works. Closing.

@diosmosis
Copy link
Member

In daf970f: Fixes #4878, re-introduce VisitFrequency Archiver in order to successfully combine pre-2.0 VisitFrequency data with new data.

@diosmosis
Copy link
Member

In 775663f: Refs #4878, fix nb_uniq_visitors metric issue in VisitFrequency archiving and fix errors in build.

@diosmosis
Copy link
Member

In ccf4b4b: Refs #4878, fix strange bug in computing unique returning visitors for visit frequency api that caused fixture to fail when running UI tests.

@diosmosis
Copy link
Member

In 2acf544: Refs #4878, add another test.

@diosmosis
Copy link
Member

In 263b070: Refs #4878, create update script for converting *_returning metrics to new segmented metrics. Removed Archiver and API. Old segmented VisitFrequency metrics will not be accessible.

@diosmosis
Copy link
Member

In b1ecd19: Refs #4878, fix improper refactor.

@mattab
Copy link
Member Author

mattab commented Apr 4, 2014

In a6a9ce2: Revert test to previous state from 10 days ago, now that we've reverted the API refs #4878

@mattab
Copy link
Member Author

mattab commented Apr 5, 2014

In db1707b: beta 12, including the VisitFrequency update code refs #4878

@mattab mattab added this to the 2.2.1 - Piwik 2.2.1 milestone Jul 8, 2014
sabl0r pushed a commit to sabl0r/piwik that referenced this issue Sep 23, 2014
…post-piwik 2 data cannot be found. Commit includes commented out tests for changes.
sabl0r pushed a commit to sabl0r/piwik that referenced this issue Sep 23, 2014
sabl0r pushed a commit to sabl0r/piwik that referenced this issue Sep 23, 2014
sabl0r pushed a commit to sabl0r/piwik that referenced this issue Sep 23, 2014
…DataAbsent and add test for multiple periods w/ pre Piwik 2 VisitFrequency data.
sabl0r pushed a commit to sabl0r/piwik that referenced this issue Sep 23, 2014
…to successfully combine pre-2.0 VisitFrequency data with new data.
sabl0r pushed a commit to sabl0r/piwik that referenced this issue Sep 23, 2014
sabl0r pushed a commit to sabl0r/piwik that referenced this issue Sep 23, 2014
…isitors for visit frequency api that caused fixture to fail when running UI tests.
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Major Indicates the severity or impact or benefit of an issue is much higher than normal but not critical. Task Indicates an issue is neither a feature nor a bug and it's purely a "technical" change.
Projects
None yet
Development

No branches or pull requests

2 participants