@glatzenarsch opened this Issue on November 2nd 2016

Hi,

Im tracking few sites with log analytics and i have 2 problems:

  1. i send one day log file with piwik import script and then execute core:archive script on piwik it has all records on dashboard, but when i reprocess for second time, records are increasing every time i run archiving.
    I deleted all visitor log data and reports for a given date and website with core:delete comands, and directly in mySQL and my dashboard for specific date is empty, but when i import logs again and run archiving i get valid records except PAGEVIEWS which are increased proportionally every time i run this procedure ( import-archive).

  2. how can i delete my historical pageview information for specific day, i tried with core:delete, core:clear-caches, optimizing database and manualy deleting old visitor logs and reports from:
    piwik_log_conversion_item, piwik_log_conversion, piwik_log_link_visit_action, piwik_log_visit, piwik_log_action, (archivenumeric) and blob archive tables (archiveblob.

when i delete everything page count is 0, and than i run procedure import-archive page count is 36857, again i delete everything page count is 0 and import-archive gives me 39857 pageview

EXAMPLE:

select DISTINC* from piwik_archive_numeric_2016_10 where idsite=12 and name="Actions_nb_pageviews" and date1="2016-10-09";
+-----------+----------------------+--------+------------+------------+--------+---------------------+-------+
| idarchive | name | idsite | date1 | date2 | period | ts_archived | value |
+-----------+----------------------+--------+------------+------------+--------+---------------------+-------+
| 22193 | Actions_nbpageviews | 12 | 2016-10-09 | 2016-10-09 | 1 | 2016-10-20 09:25:41 | # 36857_ |
+-----------+----------------------+--------+------------+------------+--------+---------------------+-------+
1 row in set (0.00 sec)

select DISTINC* from piwik_archive_numeric_2016_10 where idsite=12 and name="Actions_nb_pageviews" and date1="2016-10-09";
+-----------+----------------------+--------+------------+------------+--------+---------------------+-------+
| idarchive | name | idsite | date1 | date2 | period | ts_archived | value |
+-----------+----------------------+--------+------------+------------+--------+---------------------+-------+
| 22193 | Actions_nb_pageviews | 12 | 2016-10-09 | 2016-10-09 | 1 | 2016-10-20 09:33:41 | # 0 |
+-----------+----------------------+--------+------------+------------+--------+---------------------+-------+
1 row in set (0.00 sec)

select DISTINC* from piwik_archive_numeric_2016_10 where idsite=12 and name="Actions_nb_pageviews" and date1="2016-10-09";
+-----------+----------------------+--------+------------+------------+--------+---------------------+-------+
| idarchive | name | idsite | date1 | date2 | period | ts_archived | value |
+-----------+----------------------+--------+------------+------------+--------+---------------------+-------+
| 22193 | Actions_nb_pageviews | 12 | 2016-10-09 | 2016-10-09 | 1 | 2016-10-20 09:40:30 | # 39857 |
+-----------+----------------------+--------+------------+------------+--------+---------------------+-------+
1 row in set (0.00 sec)

AND log link visit action is only 1379 which is 28 times more..

select DISTINCT count() from piwik_log_link_visit_action where idsite=12 and server_time LIKE '2016-10-09%';
+----------+
| count(
) |
+----------+
| 1379 |
+----------+
1 row in set (0.23 sec)

and every time i do procedure pageview is rising

@mattab commented on November 3rd 2016 Owner

Hi there,

i send one day log file with piwik import script and then execute core:archive script on piwik it has all records on dashboard, but when i reprocess for second time, records are increasing every time i run archiving.

This is currently how log analytics works. Find more info in this feature request: https://github.com/piwik/piwik-log-analytics/issues/144

To work around this, you need to import only the new lines that you haven't imported before (for example, during the log rotation).

@glatzenarsch commented on November 3rd 2016

but if, for some reason i need to completely delete specific days and import logs again i ll have unreliable pageview counts, so how to purge all information including pageviews but not to get pageview increase after import-archive procedure, is it posible?

thank you very much
M.

This Issue was closed on November 3rd 2016
Powered by GitHub Issue Mirror