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
  5. FAQs

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 right.

Click Publish in the Builder

Then, toggle the Status to Live.

Builder Change Status to Live

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

Need to pause your campaign again? You can do that in the campaign Builder too; simply click Publish at the top again and toggle 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 right of your Builder screen.

Builder Publish Live

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

  • Any Website – This is a single Account-wide Embed code for all your sites.
  • WordPress – Easy to use plugin for WordPress users. If you plan on using this method please review our in-depth guide to using OptinMonster with WordPress.
  • Campaign Embed – Single embed for this campaign only.

Builder Embed Platform

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.

Builder Embed any Website

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.

Builder Embed Campaign Embed

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.


FAQs

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 Setup panel > Optin Campaign Website section of the campaign Builder.

You can control which domains your campaign is allowed to load on by adding them to the Campaign Website field.


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 page-level target your campaigns using the Display Rules in the campaign Builder.


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

A: With the Account-wide Embed option, any After Post / Inline or Sidebar type 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.

If you're using an Account-wide Embed you'll need to add the HTML placeholder to control where on the page the inline campaign appears.


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.

AFTER POST / INLINE & SIDEBAR TYPE CAMPAIGNS: if you’re adding an inline campaign (e.g. After Post / Inline or Sidebar) 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:

If you're using an Account-wide Embed you'll need to add the HTML placeholder to control where on the page the inline campaign appears.