I add this "?loyal" in url when click button of Check Yangold, to appear my third party modal. but i would like to remove when page is reload.
This is what i'm using to add "?loyal" to url when click "check yangold" Button. here is my site link.
<script>
function myFunction() {
window.location.replace(window.location.href+"/?loyal");
}
</script>
is it correct script for this condition?
var clean_uri = location.protocol + "/?loyal" + location.host + location.pathname;
window.history.replaceState({}, document.title, clean_uri);