How to Track Conversions when Using a Custom HTML Form
MailOptin allows you to include or embed custom form generated by any email marketing software, CRM or form solutions.
In this article, you’ll learn how to set cookies and track conversions when using our custom HTML integration option.
There is a special class that you can use to notify MailOptin that a conversion has happened and set cookies if they’ve been configured for your optin campaign.
Add the class mo-trigger-conversion
to your custom HTML-form’s submit button or link.
Examples:
<form method="POST" src="https://example.com/process.php">
<input type="text" placeholder="First Name">
<input type="email" placeholder="Email Address">
<input type="submit" class="mo-trigger-conversion" value="Submit Now!">
</form>
<a href="https://mailoptin.io" class="mo-trigger-conversion">Check out MailOptin!</a>
When the form is submitted or the link is clicked, MailOptin will know that a conversion has taken place and also sets a cookie if you’ve specified a Success Cookie Duration value for your optin campaign.
Say the form is placed in a lightbox popup and the form is submitted, the popup won’t show up again because a success cookie duration would have been set by MailOptin.
It’s that easy.