moved the analytics to the top to fix the event tracking