Very helpful and works perfectly. Two things would be nice: 1) handle both

Very helpful and works perfectly. Two things would be nice: 1) handle both http/https 2) track events (e.g. “trackEvent” similar to trackPageview)