You cannot always do a post call on page unload.
Answering my own question because of a couple things I discovered in my research:
There's no such thing as "check if the page was not left after preventdefault was called."
Also, this is not what preventdefault is for. The get call is made no matter what, even if you don't leave the page.
beforeUnload may work all the time locally, but not on the server. Listen to what everybody says, it's not worth it.
However, pageHide does almost everything you want successfully. In page navigation/refresh, it will do the API call, if you put "keepalive: true" in your request options.