3

We want to clean up Sitecore Analytics data (MongoDB + SQL) that are old (say 3 months).

I already looked at Sitecore ADM and this question

However, it seems that Sitecore ADM does not support scheduling of clean up.

Is there a way to do this task periodically in Sitecore 8.1 (update 3), e.g. once a day?

  • The only data i can see which you can clear is from the Interaction collection in MongoDB. The steps is first to remove the interaction from MongoDB which has a savedatetime greater than 3 months and then you will need to trigger the rebuild reporting database for the experience analytics dashboard to get updated. Note that rebuild reporting database can take time to complete depending on the amount of data in MongoDB – Hishaam Namooya Aug 11 '18 at 10:19
  • @HishaamNamooya Thank you - I will use this approach with a few additions (inspired by the Sitecore ADM module). For every interaction entry, clean up the associated contact, formdata, device and useragent collections. If you post a comment with your suggested approach I will mark it as an answer. – Hos Aug 14 '18 at 12:33
  • I've posted the above comment as an answer. Can you please approve it – Hishaam Namooya Aug 14 '18 at 12:37
2

The only data I can see which you can clear is from the Interaction collection in MongoDB. The steps are

  1. First to remove the interaction from MongoDB which has a savedatetime greater than 3 months

  2. Trigger the rebuild reporting database for the experience analytics dashboard to get updated.

Note that rebuild reporting database can take time to complete depending on the amount of data in MongoDB.

You can customize the approach based on your requirement if needed.

  • How do you get around the limitation, that you need to add/remove a secondary connectionString 'reporting.secondary' for rebuilding the Analytics db? During rebuilding it has to exist, but after rebuilding is done, it should be removed again as far as I understand. – Hos Aug 20 '18 at 9:18
  • Yes rebuild should be on the reporting.secondary. Once the rebuild is completed, you switch the connection string bu commenting the reporting.secondary then you update the primary one with the new analytics database. This is performed manually – Hishaam Namooya Aug 20 '18 at 9:21
  • Ah too bad. I was hoping to create a 100% automatic task without any manual steps. – Hos Aug 20 '18 at 11:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.