Affects Version/s: None
Component/s: Content Targeting
Currently, the time unit of the clean up tasks is one day by default.
The administrator of the portal should be able to set a lower time unit to increase the frequency of this task in cases where the Anonymous Users table grows more than wanted under heavy loads.
The tracking of anonymous user activities for segmentation and reporting requires the storage of data in the Liferay DB. These data are periodically cleaned up in order to preserve DB storage resources. Audience Targeting 3.0 provides new means to customize how often this clean up is performed.
In System Settings > Content > Audience Targeting, the affected services (Audience Targeting Service, Audience Targeting Analytics Service and Audience Targeting Anonymous User Service) include the following options (view attachments):
- Check Interval and Check Interval Time Unit: define how often the data clean up takes place. For instance, with a check interval of 1 and a time unit of DAY, the data clean up task executes once a day.
- Max Age and Max Age Time Unit: define how old the data must be in order to be removed by the clean up task. For instance, with a max age of 10 and a time unit of HOUR, any data older than 10 hours will be removed when the clean up task is executed.
When the configuration is saved, changes take effect immediately.
- Install Audience Targeting 3.0 in Liferay Portal 7.1
- Create a User Segment that is matched by the current user (e.g. Age between 0 and 100)
- Navigate through some pages
- Assert that the following tables have content: ct_analytics_analyticsevent; ct_au_anonymoususer; ct_anonymoususerusersegment
- Go to System Settings > Content > Audience Targeting
- Go through Audience Targeting Service, Audience Targeting Analytics Service and Audience Targeting Anonymous User Service and change the following settings:
- Check Interval = 1
- Check Interval Time Unit = MINUTE
- Check Max Age = 1
- Check Max Age = MINUTE
- Wait a minute
- Assert that the tables mentioned at point 4 are empty.