Integrating the OptiMonk Campaigns with Webhook

 

The Webhook integration allows you to connect OptiMonk with any marketing software. We recommend using Webhook in case OptiMonk does not have a direct integration with your selected system. It can also be useful when you wish to send more data than we send by default. Please note the Webhook integration requires coding your own webpage. If you do not have a developer, consider using Zapier for the integration, as it does not require any coding knowledge to set up.

How does the Webhook integration work?

A Webhook integration sends certain data to an URL you provide in the integration settings in your OptiMonk dashboard. After a visitor completes a form in one of your popups with a Webhook integration, the following data is sent by default via POST method:

  • First name (variable: firstname)
  • Last name (variable: lastname)
  • Email address (variable: email)
  • Phone number (variable: phone)
  • URL address (variable: url)
  • Campaign name (variable: campaign[name])
  • Campaign ID (variable: campaign[id])
  • Coupon code (variable: custom_fields[coupon_code], if the campaign template is "Lumira/Vegas")
  • GDPR checkbox value (variable: custom_fields[om_policy_checkbox])
  • Dropdown (variable: dropdown)
  • Checkbox (variable: checkbox)
  • Feedback (variable: feedback)
  • Radio (variable: radio)
  • Country (variable: )
  • City (variable: )
  • ZIP (variable: )

mceclip0.png

mceclip1.png

https://webhook.site/

Please note: In the case of Webhook, there is no need for any extra marking, therefore the easiest way is to provide the subject's name on the input field within OptiMonk.

Testing the Webhook integration with the PHP sample page

Here’s how to test the Webhook integration using the OptiMonk PHP sample page:

  1. Log in to your OptiMonk dashboard at https://app.optimonk.com/login/en

  2. Select Campaigns on the left, then select the Campaign you want to use for Webhook integration:

    mceclip0.png

  3. Select Edit settings on the right:

    mceclip1.png

  4. Click on Add new integration under Add integration:

    mceclip2.png

  5. Select Webhook from the list:

    mceclip3.png

  6. Enter the name of the integration and URL of php sample page: https://www.optimonk.hu/webhook_sample.php in the URL field, then click Done and Next in the top right corner to save the changes:

    mceclip4.png

  7. Test the settings by completing a popup for this campaign on your website. Please note: if you have multiple Campaigns on your site, make sure you are triggering the Campaign which you updated with the Webhook integration following the steps above. 

Testing the Webhook integration with hookbin.com:

Here’s another way you can test the Webhook integration by using the website hookbin.com:

  1. Log in to your OptiMonk dashboard at https://app.optimonk.com/login/en

  2. Select Campaigns on the left, then select the Campaign you want to use for Webhook integration:

    mceclip0.png

  3. Select Edit settings on the right:

    mceclip1.png

  4. Click on Add new integration under Add integration:

    mceclip2.png

  5. Select Webhook from the list:

    mceclip3.png

  6. Open https://hookbin.com/ and click on Create new Endpoint:

    mceclip5.png

  7. Copy the Bin URL:

    mceclip5.png

  8. Return to the OptiMonk dashboard and paste the URL:

    mceclip6.png
    Give a name to the integration, then click Done and Next in the top right corner to save the changes.

Test the settings by completing a popup for this campaign on your website. Please note: if you have multiple campaigns on your site, make sure you are triggering the campaign which you updated with the in URL following the steps above. Once you’ve completed the popup, refresh the page at HookBin. When everything is set up correctly, you should see data like this:

3._eng.JPG

You can find the data sent by OptiMonk in Body.

You can easily use Webhooks by Zapier to handle the subscriber information OptiMonk gathers for you.

That's it! :) If you have any further questions or need additional further help, just let us know at support@optimonk.com and we would be happy to assist you further.

Have more questions? Submit a request

Comments