In order to enter new records to HubDB, you need to make an API connection with your HS DB using the API key and need to run the API calls on a third party server ( like PHP or Python )
It means that in order to manage the click counts data, you need to send a post request from client side to server side.
I don't think that it would be safe to use the HS API key at client side to make API calls. Next I doubt that we can write scripts for the same in HS. Also my team has worked on same and they have managed all with 2 ends i.e all submissions/input from HS script which sends the post call to make DB connection with the data.
// Click on close icon $(".close-icon").click(function(){ InsertDBValues('Yes','No',''); $(".geo-ip-bar").hide(); });
// Click on Redirection link $(".country-text a").click(function(){ var col_country = $(this).text().trim(); // Ex: Columbus India var col_country=col_country.split(" "); var country_name=col_country[1]; // India alert(country_name); InsertDBValues('No','Yes',country_name);
}); },3000); });
function InsertDBValues( is_closed, is_redirected,country_name) { var page_url= window.location; // Get page URL var dt = new Date(); var timezone_cet= dt.setHours( dt.getHours()+1 ); // Converted CET