I am trying to implement a feature where i use the journey.leaveApp function after a button click to make this easy for the user. i have followed the documentation suggestion in the use of that function but I kept getting the error:
journey.leaveApp is not a function
Here is a sample of my code:
function leaveApp(){
return journey.leaveApp({ keepData: false });
}
I have also tried this function without the return statement, and I get the same error.