Update main.js

event tracking added