fixed missing refernece to window in analytics.js