This is caused by a database design issue in PIWIK, you can fix it by opening MySQL workbench or phpmyadmin and editing the database table column as follows.
As you can see we've edited the piwik_log_link_visit_action.idlink_va design "Data Type" from INT(11) to BIGINT(11).
INT is too small to run larger segments, so we need to switch it to BIGINT, the number just specifies the columns "display width" when output.
BIGINT8 Bytes, -2^63 (-9,223,372,036,854,775,808) to 2^63-1 (9,223,372,036,854,775,807)
INT 4 Bytes, -2^31 (-2,147,483,648) to 2^31-1 (2,147,483,647)
After you've done this apply and rerun your reports from either opening the piwik stats page or by command line, cron job, task manager task if you have one of these setup.
If using windows server, you can setup a batch file to run via task manager every 15 minutes or as needed depending on traffic and number of sites your run stats for. Here is what you update.bat file should looke like
mode con: cols=140 lines=40
php "(Drive):\PathtoPWIKwebsite\console" core:archive
- The first line is optional and I included it because it allows me to specify the size of the CMD window it will open on the server, this is nice because you can make it as large or small as you would like.
- The second line is your command line to run the actual PIWIK archive, this will update all of the stats under actions and a few other things, This is considered archive for PIWIK.
- The third line is optional, I use this to specify a timer so you can see that the script is running correctly.
Now set windows task manager to run this every x number of minutes.
That's it your done.