How to Add OptinMonster to Any Website

OptinMonster can work with any website. The best lead generation tool works on custom CMS sites too.

In this article, you’ll learn how to add OptinMonster to any website.

Before You Start

Here are some things to know before you begin:

Add OptinMonster to Website

To add OptinMonster to any website, follow these steps:

  1. Choose a campaign to edit in the campaign builder.
  2. From within the campaign builder, navigate to the Publish view and select the Any Website embed option.
    Publish Any Website
  3. Copy the embed code provided.
  4. Paste the embed code into your site template file just before the closing </body> tag.

Example Configuration

In this example, we’re editing the index.html file. Note: Your own site may use a different file naming convention, use file snippets, or use an interface option for adding embed codes.

Paste the embed code you previously copied just before the closing </body> 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 site and test your beautiful new campaign.

FAQs

Questions about how the Embed Code works?

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.