Data Retention
This feature is part of Viewtracker 7 and higher.
What Data Retention is for
Administrators can now decide to limit the period for which Viewtracker data is stored. This feature is called "Data Retention".
Per default, all analytics data in Viewtracker is stored for all time (i.e. since Viewtracker was first installed on your instance). You only need this feature if you would like to limit the data retention period.
Limiting the time period may be useful for the following reasons:
Improving report performance in big Confluence instances with a lot of collected data.
Meeting data privacy regulations ("right to be forgotten").
How to change the Data Retention period
Access the tracking settings via ⚙ → Analytics Cockpit → Tracking
Select the tab "Data Retention".
In the drop-down, choose a different data retention period.
Confirm the warning message by selecting "Confirm period". This will permanently delete data outside the selected period.

Effects of a shorter Data Retention period
The app will remove all tracking data (views, searches) older than the selected time period. A Job will run daily at 1 AM to clear excess data.
The app will still store the total of the views for every content (page, blog, attachment). New views will be added to that total.
Tracked searches will be deleted forever.
Customize the Data Retention Job
The scheduled job initially deletes data outside the specified period and then deletes it on a daily basis. Beginning with Viewtracker version 10.1.0, it is configured with adjustable batch size and timeout parameters. Follow these steps to adjust the entries.
Ensure that the Data Retention period is specified in the Viewtracker Admin Configuration.
Stop the Confluence instance.
Specify the batch size and wait timeout in the Viewtracker system properties
<installation-folder>/bin/setenv.sh
, for example:CODECATALINA_OPTS="-DViewtrackerDataRetentionDeleteBatchSize=5000 ${CATALINA_OPTS}" # 2 seconds in miliseconds CATALINA_OPTS="-DViewtrackerDataRetentionDeleteWaitTimeout=2000 ${CATALINA_OPTS}"
The batch size should be in the range of [1000, 100000]. By default, 100000 is used when the system property is not specified.
Wait timeout should be in the range of [0, 5000]. By default, 1000 is used when the system property is not specified. 0 means no timeout.
Start the Confluence instance.
The job “Bitvoodoo: Analytics Data Retention Job” runs daily at 1 a.m. You can modify the schedule for this job under admin/scheduledjobs/viewscheduledjobs.action.