use plain js for analytics.