The solution to this question most likely involves databasing, but unfortunately Squarespace does not play well with many databases yet such as mySQL.
My question is if there is any way or code that I can implement without setting up a database to capture some information (username, ip address, location, timestamp) when a user on the site clicks a 'submit' button and pipe it to a log file? I'm sure there has to be, and I apologize for not having any code related to my question ready, I'm still researching solutions. I can provide the jQuery code for the button:
<body>
<div id="popup" align="right">
<object type="text/html" id="terms" data="/popup-form" width="60%" height="90%" style="overflow: auto">
</object><br>
<form>
<input id="cancel" type="button" value="Cancel" onClick="history.go(-1);return true;"/>
<input id="submit" type="submit" value="I Agree" />
</form>
</div>
<script src="http://code.jquery.com/jquery-latest.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.min.js"></script>
<script>
$("form").on("submit", function(e){
e.preventDefault();
$("#popup, #overlay").hide();
$.cookie("popup", "displayed", { expires: 7 });
});
var hasSeenpopup = $.cookie('popup');
if(!hasSeenpopup){
$("<div>",{ id : "overlay" }).insertBefore("#popup");
$("#popup").show();
}
</script>
</body>