How to Integrate OptinMonster with an HTML Site

Want to add OptinMonster to your HTML website? Our embed codes make it easy! This guide will show you how you can integrate the power of OptinMonster into your HTML site.

  1. Create and Publish a Campaign
  2. Paste the Embed Code

Step 1 – Create and Publish a Campaign

The first step is to create a campaign and retrieve it’s embed code. See this guide on how to embed your campaigns on your site for a step-by-step walkthrough if you need assistance.

Step 2 – Paste the Embed Code into Your HTML Site

Open a page file of your HTML Site in a text editor, in this example we’re editing the index.html file.

Go ahead and paste the embed code you previously copied just before the closing tag of your HTML file. Save the changes to your file and upload it to your site.

You can paste the embed code into your HTML file near the closing body tag.

You’re all done! You can now navigate to the front-end of your HTML site and test your beautiful new campaign!

We hope this guide helped you to add OptinMonster on any and all of your websites. You may also want to check out how to split-test your campaigns to get higher conversions.


FAQs

Q: I have questions about how the Embed Code works.

A: If you have any questions, such as:

    • What domain do I enter when creating my campaign?
    • What’s the difference between the Sitewide and Campaign Specific embed codes?
    • I’m using the Sitewide Embed, how do I control where my campaigns load?
    • I’m using the Sitewide Embed, how do I control where on the page my After Post / Inline or Sidebar campaigns appear?
    • Does the embed code have to be pasted before the closing </body> tag?
    • How do Afterpost and Inline Campaigns work with Embed Codes?

All of the questions above are answered on our main Embed Documentation available here.