OptinMonster allows you to use any Email Service Provider or fully customize your campaign forms using our Custom HTML Campaign Form integration option.
Before You Start
Here are some things to know before you begin:
- This article assumes you’re already familiar with how the Custom HTML Integration works.
- Cookies control how often your campaign can re-appear to a visitor after they’ve closed or converted through it. Learn more about cookies here.
- This article involves adding a class to your form’s submit button. A class is a way of naming an element so it can be easily identified.
Track Conversion & Set Cookies
There is a special class that you can use to notify OptinMonster that a conversion has happened and set cookies if they’ve been configured for your campaign.
Add the class
om-trigger-conversion to your custom HTML form’s submit button. For example:
<form method="POST" src="http://www.example.com/form.php"> <input type="text" placeholder="First Name" /> <input type="email" placeholder="Email Address" /> <input type="submit" class="om-trigger-conversion" value="Submit Now!" /> </form>
This lets us know that a conversion has taken place when the visitor selects the submit button in your custom HTML form, and also sets a cookie if you’ve specified a Cookie Duration value for your campaign.
Track Conversion Only
If you’d prefer to track conversions only, but not set any cookies, you can use the class
<a href='https://optinmonster.com' class='om-trigger-alt-conversion'>Check out OptinMonster!</a>
My custom form is in an iFrame element, can I still add this class?
At this time it’s not possible to track conversions if your form is within an iFrame element. This is a limitation of technology and not unique to OptinMonster.
If your Email Service Provider has a non-iFrame version of the form embed code you should use that instead and follow this guide to add the required class to track conversions and set cookies.