Skip to content

Instantly share code, notes, and snippets.

@keshcreations
Last active June 5, 2018 16:57
Show Gist options
  • Save keshcreations/f7e1022b1d06f0d8ac8c75ddad08a777 to your computer and use it in GitHub Desktop.
Save keshcreations/f7e1022b1d06f0d8ac8c75ddad08a777 to your computer and use it in GitHub Desktop.
window.usabilla_live("setEventCallback", function(category, action, label, value) {
var newURL = window.location.protocol + "//" + window.location.hostname;
var type = null;
switch (action) {
case "Campaign:Open":
type = "feedback";
history.replaceState(null, null, newURL);
break;
case "Campaign:Success":
type = "feedback";
break;
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment