aarongoldsten
Junior Member
- Oct 22, 2014
- 177
- 64
looking for a way when someone clicks my link / goes to a certain page (my google doc form) i get an email notification about it. ty
<a href="youForwardingURL" onclick='sendmymail("name of link clicked like privacy policy")'>Privacy</a>
function sendmymail(link) {
var dataString = 'link='+ link;
$.ajax({
type: "POST",
url: "send.php",
data: dataString
});
<?php
if($_POST){
$link = $_POST['link'];
}
//send email
mail("[email protected]", "Link Clicked", 'Someone clicked on the link: '.$link.'.');
?>