I wanted to add that we also have a SQL Data Explorer report for Cohort Analysis - Monthly User Activity that you can run directly through Discourse.
That report considers posts created as the criteria for considering a user active during a month, but the report could also be modified further depending on how you wanted to specific types of track retention data on your site.