Legacy Knowledge Base
Published Jul. 2, 2025

Two tables growing in size related to Audience Targeting

Written By

Phil Chapman

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.

Issue

  • Why are these particular tables increasing in size?

    CT_ANALYTICS_ANALYTICSEVENT 
    CT_ANALYTICS_ANALYTICSREFERRER

Environment

  • DXP 7.2    DXP 7.1

Resolution

  • Firstly, this is an intended behaviour related to Audience Targeting and it can be modified

    Table 1.
    ct_analytics_analyticsevent 
    This table keeps track of many of the actions that a user can make in a portal, e.g. navigating through pages or viewing web content articles etc. The data captured can potentially cause the database to grow very rapidly for even a moderately used portal.

    Table 2.
    ct_analytics_analyticsreferrer
    This table tracks the object (normally a page) that referred the user to that action.

    If we wish to reduce/clear the amount of data being stored, there is a mechanism for this.
    We can set a more frequent interval for cleanup.

    Go to: Control Panel > Configuration > System Settings > Audience Targeting

  • For these 3 sub-categories >>

    • Audience Targeting Anonymous User Service
    • Audience Targeting Service
    • Audience Targeting Analytics Service 

      Adjust these settings in each sub-category >>
       
      • Check Interval = enter numerical value
      • Check Time Unit = enter unit of time
      • Max Age = enter numerical value
      • Max Age Time Unit = enter unit of time


Here is a short test to demonstrate:

Environment: DXP 7.1 bundle + MySQL 5.7 + Audience Targeting 3.0.0

Steps Taken

1. Verify initial CT_ANALYTICS_ANALYTICSEVENT table size [test case - 16Kb]
2. Create a Public Page "Test Page"
3. Click 20 times between Welcome Page and Test Page
4. Observe current CT_ANALYTICS_ANALYTICSEVENT table size [test case - 80Kb]
5. Control Panel > Configuration > System Settings > Audience Targeting

For these 3 sub-categories >

  • Audience Targeting Anonymous User Service
  • Audience Targeting Service
  • Audience Targeting Analytics Service 

Change the following settings to these test values:

DISCLAIMER 
The value of 1 (one) MINUTE (below) is only used here for demonstration purposes.
Please adjust this value to suit your own system needs.

  • Check Interval = 1
  • Check Time Unit = MINUTE
  • Max Age = 1
  • Max Age Time Unit = MINUTE


6. Wait over 1 minute then recheck the size of the CT_ANALYTICS_ANALYTICSEVENT table

Result: Table size returns to [test case - 16Kb] 

Additional Information

Did this article resolve your issue ?

Legacy Knowledge Base