How to Embed Your Campaigns On Your Site

Are you ready to add OptinMonster to your site? Are you trying to discern whether you should add the campaign-specific or Account-wide embed code to your site?

With OptinMonster, we give you the flexibility in how you add OptinMonster campaigns to your site so you can increase conversions.

  1. Create a Campaign
  2. Enable the Campaign
  3. Copy the Campaign Embed Code
  4. Paste the Embed Code

Step 1 – Create a Campaign

This step is relatively easy. Check out this document on Creating Your First Campaign if you haven’t created a campaign yet.

Step 2 – Enable the Campaign

When you create a new campaign, it’s Paused by default.

Once you’ve finished configuring your campaign and it’s ready to be displayed on your site, click Publish at the top.

Click Publish

Then, toggle the Publish Status to Live.

Change Status to Live

Once your campaign is live you’ll see this status reflected in the top menu bar.

Publish Live Status

Need to pause your campaign again? You can do that in the campaign Builder too. Simply click Publish at the top again and toggle Publish Status back to Paused.

Step 3 – Copy the Embed Code

Once you have created your campaign, you need to copy the embed code. Click the button titled Publish in the top of your Builder screen.

Click Publish

It will take you to the screen below where you’ll see five embed options:

Embed Options

Account-wide Embed Code

If you choose to use the Account-wide Embed Code option, click Any Website to expand its view and you’ll see the embed code you can copy to add to all your sites.

Any Website Embed Code

Campaign Specific Embed Code

If you choose to use the Campaign Specific Embed Code option, click Campaign Embed to expand its view and you’ll see the embed code you can copy to add to your site.

Campaign Specific Embed Code

Once you’ve copied the appropriate embed code, you’re ready to move to the next step.

Step 4 – Paste the Embed Code

The last step is to paste your Embed Code into your site. We have many different platform specific guides as well as our general guide to load OptinMonster on any website.

Want to control when your campaign appears? See how to set display rules for your campaigns!


Q: What domain do I enter when creating my campaign?

A: When creating your campaign you can add your site’s custom domain (the domain used to reach the front-end of your site) in the Publish tab > Website section of the campaign Builder.

Publish Website

Q: What’s the difference between the Account-wide and Campaign Specific embed codes?

A: You may find a specific purpose for each version of embed code to best fit your workflow:

Account-wide Embed: The Account-wide Embed code only needs to be added once to allow all campaigns that are configured to load on the specific domain to appear. This embed code can save significant time as there is no need to update it when you want to replace or remove a campaign. Simply Pause or Delete the campaign within your OptinMonster account and that change will be immediately reflected on your website.

Campaign Specific Embed: The Campaign Specific Embed code is unique to the individual campaign and must be added everywhere you want that campaign to appear. If you wish to embed multiple campaigns across your site and are using the Campaign Specific Embed you will need to add the unique embed code for each campaign where you want that campaign to load. If you want to replace or remove a campaign you must manually edit the embed code present on your site.

Q: I’m using the Account-wide Embed, how do I control where my campaigns load?

A: When using the Account-wide embed code, it’s important you use Display Rules in the campaign Builder to configure where and how your campaign loads.

Q: I’m using the Account-wide Embed, how do I control where on the page my Inline campaigns appear?

A: With the Account-wide Embed option, any Inline campaigns will provide a specific HTML Placeholder in the Account-wide Embed panel you can copy and paste into your page where you want that specific campaign to appear.

Inline Embed Code

Q: Does the embed code have to be pasted before the closing body tag?

A: No, you can add the embed code anywhere within the body of your site, however there is no reason to add the campaign further up the page for popup type campaigns. Since the campaign doesn’t load until the rest of your site has loaded we recommend adding the embed code for any popup type campaign just before the closing </body> tag.

INLINE CAMPAIGNS: if you’re adding an inline campaign, it’s important to note that the campaign will appear on your page exactly where you place the embed code when using the Campaign Specific Embed.

If you’re using an Account-wide Embed on your site you’ll need to add the HTML placeholder as indicated in the Account-wide Embed panel to control where on the page of your site the inline campaign appears:

Inline Embed Code