Wrote rake task for gathering analytics