I'm attempting to expire the Marketo tracking cookie (_mkto_trk) with javascript in order to detach a user's history prior to submitting a kiosk form. This is the code I have set:
<script type="text/javascript">
function deleteCookie() {
var c_name = "_mkto_trk";
var expireDate = new Date();
expireDate.setDate(expireDate.getDate() - 1);
expireDate = expireDate.toGMTString()
document.cookie = c_name + "=deleted; expires=" + expireDate;
}
</script>And this code fires onload with an image. I've verified this code does indeed work for test cookies I create, but for whatever reason, I can't seem to alter the Marketo cookie.
Additionally, I have used this code on both my www site and the Marketo subdomain, in case it was a domain issue, but neither seem to work.
Any ideas?