Update main file and add analytics.