Ajax call by click
$(".logo a").click(function(e) {
e.preventDefault();
var data = {
action: "counter"
};
$.ajax({
url: ProjectLinks.backendSiteName + "/wp-admin/admin-ajax.php",
type: "POST",
data: data,
dataType: "json",
success: function(response) {
console.log(response);
}
});
});