@mattab opened this issue on March 20th 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 https://github.com/piwik/piwik/commit/a701d4a43a7185b9d9422de0d1d97c9b2e0fcc5d

@mattab commented on March 24th 2014
@mattab commented on March 26th 2014
@mattab commented on March 26th 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 commented on March 26th 2014

In 6db8deac1e34f07ba6e7a7cd88dddfb464ae5b87: 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 commented on March 26th 2014

build is failing, reopening

@mattab commented on March 26th 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 commented on March 26th 2014

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

@mattab commented on March 26th 2014


Call to undefined method Piwik\Plugins\VisitFrequency\API::addPrePiwik2DataIfMissing()

@mattab commented on March 26th 2014

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

@diosmosis commented on March 27th 2014

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

@diosmosis commented on March 27th 2014

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

@diosmosis commented on March 27th 2014

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

@diosmosis commented on March 28th 2014

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

@diosmosis commented on March 28th 2014

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

@diosmosis commented on March 29th 2014

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

@diosmosis commented on April 3rd 2014

In 263b0700c9f700bc00749fbadc0f67f4bc478b26: 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 commented on April 3rd 2014

In b1ecd19eeb1020aaaa8e9176adb8908d69dffe30: Refs #4878, fix improper refactor.

@mattab commented on April 4th 2014

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

@mattab commented on April 5th 2014

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

This issue was closed on April 5th 2014
Powered by GitHub Issue Mirror