JavaScript helper for declarative tracking Google Analytics events