parse query string to pass to events