Как то так
<html>
<head>
</head>
<body>
<input id="i" value="mask">
<button id="b">delete</button>
<form action="php/contactform.php" id="contact-form" method="post">
<div class="contact_form">
<div class="input-field">
<input id="first_name" type="text" name="contact-name" class="validate">
<label for="first_name">Ваше имя</label>
</div>
<div class="input-field">
<input id="contact_phone" type="tel" name="contact-phone" class="validate">
<label for="contact_phone">Номер телефона</label>
</div>
<div class="input-field">
<input id="contact_email" type="email" name="contact-email" class="validate">
<label for="contact_email">Email адрес</label>
</div>
</div>
</form>
<button id="post" class="btn waves-effect waves-light" name="action">Отправить</button>
<script>
yaCounter32206279={reachGoal: function(){alert("just test")}}
post.onclick=function(){
yaCounter32206279.reachGoal('ORDER', "yaGoalParams")
window["contact-form"].submit()
}
</script>
</body>
</html>