How to Connect OptinMonster with a Webhook

Do you want to configure a webhook for your campaign? It’s easy with OptinMonster’s webhook integration! Here we’ll show you how to connect a webhook to your OptinMonster campaign to easily receive your campaign’s submitted data.

NOTE: This feature is for Advanced Users. Due to the custom nature of webhooks, at this time we are unable to provide support related to your custom implementation. This documentation is provided with the assumption that you know how to utilize webhooks, or are working with a developer who is familiar with webhooks.

Data Structure

Lead data will be formatted via JSON and resemble the example below:

{
    "lead": {
        "email": "hello@optinmonster.com",
        "firstName": "Archie",
        "lastName": "Monster",
        "phone": "888-888-8888",
        "ipAddress": "1.2.3.4",
        "referrer": "https://optinmonster.com"
    },
    "campaign": {
        "id": 440725,
        "title": "My Lightbox Campaign",
        "slug": "zqw3qfcie3ogtanf"
    }
}

Your webhook can receive the following lead data:

  • lead
    • email – the Email Address submitted
    • firstName – the First Name submitted (if First Name field is enabled in your campaign)
    • lastName – the Last Name submitted (if First Name field is enabled in your campaign)
    • phone – the Phone submitted (if Phone field is enabled in your campaign)
    • ipAddress – the IP Address of the computer the lead was submitted from
    • referrer – the URL of the page the campaign was submitted from
  • campaign
    • id – the ID of the campaign submitted
    • title – the Title of the campaign submitted
    • slug – the Slug of the campaign submitted

Integrating Your Webhook With OptinMonster

Step 1: Add an Integration

In the campaign Builder, select the Integrations tab to view the Integrations panel.

Select the Integrations tab

If this is your first time connecting an integration to your campaign you’ll want to click New Integration. If you have already connected an integration, you will want to click Add Another Integration instead.

Select New Integration

Next, select Webhook from the Email Provider dropdown.

Step 2: Enter Your Webhook URL

Next, paste your Webhook URL into the corresponding field. Don’t forget to add a unique Account Label for easy identification!

Then, select the Connect with Webhook button.

Add the builder webhook URL

Once connected, you’ll see the following message in the Integrations panel:

That’s it! You’ve successfully connected your Webhook to OptinMonster!

Do you want to use Webhooks to connect your campaigns with Zapier? See our guide on how to connect OptinMonster with Zapier to get started!


FAQs

Q: I’m new to Webhooks, how can I find out more about them?

A: Some good resources to learn more about the basics of webhooks include:


Q: I’d like to use Webhooks, but am not technical. Can I use Webhooks without writing any code?

A: Yes! Zapier allows you to get started using Webhooks without having to know how to code anything. Please note that Zapier is a paid service, however they do provide a free trial if you want to see if their tools suit your needs.

See our documentation for more ways to connect OptinMonster and Zapier:


Q: I can only enable the ‘Name’ field in my campaign, how do I collect the First and Last Names?

A: OptinMonster will automatically detect if someone has entered their first and last names into the Name input field. You only need to enable the Name field in the Optin panel of the Builder to collect both the First and Last Name.

Builder Toggle Name Field