added heartbeat and pageview events