Přejít k obsahu  Přejít k hlavnímu menu

Blog / Knowledge base

Updated: 5. August 2020


Data transfer from Mailocator via Webhook to third parties

Supported data formats

Data formats: filed name=value&..., XML, JSON and data aggregated into a POST variable data

Supported HTTP methods

Most formats can be combined with HTTP methods GET, POST or PUT

Basic structure of transmitted data

At least the following fields (variables) are returned in each request:
engine - contains "Mailocator"
time - contains unix timestamp of sending the request
email - contains a valid email address

Optionally, additional data from the popup form sent by the action can be added subscribe


Request with POST method and JSON format
Return data, result of PHP function call var_export($_POST,1)

array (
'{"engine":"Mailocator","time":1596634651,"email":"test@mlctr_com"}' => '',

Request with POST method and XML format
Return data, result of PHP function call var_export($_POST,1)

array ('<?xml version="1.0"?>

Request with POST method and XML format
Return data, result of PHP function call file_get_contents('php://input')

<?xml version="1.0"?>

Expected return codes from a third-party server:

1 - contact saved successfully, Mailocator will display a thank you note
0 - contact was not saved successfully, Mailocator displays information about the duplicate contact

If the content is different or empty, the processing process is interrupted by Mailocator, an error is written in the monitoring.

PHP example

After successfully processing the request on the server, just call echo '1';, the return value is interpreted as a correctly stored contact.


Instructions for your own design for the wheel of fortune

How to create a wheel of fortune with your own HTML and CSS code

How to Thank you page in Mailocator?

See how to better bring your future customers back to your site as you complete the verification process.

Wheel of Fortune

A popular gamification element is the wheel of fortune, in which the user is offered a reward for providing data or subscribing to newsletters.

Mark campaign conversions with actions

Where a campaign is not automatically marked as converted (such as a newsletter sign-up), you can add a conversion using an action to better evaluate the success of the campaign.

Scenario testing laboratory

An easy way to verify the functionality of the scenario in Mailocator is to run a laboratory where you can see the entire course of processing over time, including the evaluation of conditions and user actions.

Disabling and enabling Mailocator using a parameter in the URL

If you need to limit campaigns in time and the UTM parameter is not available, you can use the internal parameter of Mailocator