How to Add A Close Link or Button to OptinMonster

OptinMonster makes it easy to add a close link or button to popup type campaigns.

In this article, you’ll learn how to add a close link or button in OptinMonster.

Before You Start

Here are some things to know before you begin:

  • You can add a close button to any popup type campaign (Lightbox, Fullscreen, Floating Bar, Slide-In). They cannot be added to Inline campaigns.

Show Close Button

You can optionally show a close button in your campaign by enabling it in the campaign builder.

To add a close button, follow these steps:

  1. In the Design view of the campaign builder, select the Settings icon.
    Settings icon in the OptinMonster campaign builder
  2. Next, from the Basic tab in the sidebar expand the View styling option. Locate and toggle the Display a close button? setting.
    Enable the close icon in the campaign builder for your OptinMonster campaign.
  3. (Optional) You can style the close button using the options available.
  4. When you’re finished, click Save.

Close Button Element

You can also use a button element to close the campaign. This can be added in addition to the close button outlined in the previous section, or on its own.

To add a button element to close the campaign, follow these steps:

  1. In the Design view of the campaign builder drag a Button block into your campaign where you would like for it to appear.
    Add button block to campaign in the builder.
  2. Next, in the sidebar select the Close the campaign option from the Button Click Action dropdown.
    Button click action close the campaign.
  3. When you’re finished, click Save.

HTML Close Link

If you’d prefer to use HTML you can also add a close link with this approach.

To add an HTML close link to your campaign, follow these steps:

  1. In the Design view of the campaign builder drag a Button block into your campaign where you would like for it to appear.
    Add HTML block in the OptinMonster campaign builder.
  2. Next, in the Content tab add an HTML link containing the class om-trigger-close into the HTML field, for example:
    <a href="#" class="om-trigger-close">Click to close!</a>

    HTML close link in the campaign builder using an HTML block.

  3. When you’re finished, click Save.

Troubleshooting

Will my HTML close link set the campaign close cookie?

Yes, when following our instructions for adding an HTML close link to your campaign the proper cookies will be set to hide the campaign as it has been configured in the cookie settings of the builder.