Add a userId to the window when loading bookmarklet. This userId is either the first UserId from all the accounts, or the userId associated with the default campaign; Refactor the bookmarklet href string builder; Refactor the logEvent method to accept an object with options