save segments as well as day entries, store first_seen, last_seen and seen_count in application_metadata subdocument