store activity and set identifier in the db