Placeholders allows you to create personalized emails content and urls.
[[placeholder_name]] - will be replaced with the value of the placeholder.
[[first_name]][[last_name]]
LeadBI Native Forms allows you to capture data from existing website forms.
To target a specific form you need to specify an html5 id associated with the form, by not specifying it leadbi will try to capture all forms from the page.
data-leadbi-email="true"data-leadbi-full-name="true"| // check if $leadbi_website api is available | |
| if(window.$leadbi_website){ | |
| // fetch user object of the current visitor | |
| window.$leadbi_website.getCurrentUser(function (err, user) { | |
| // call the identify api | |
| // calling this method multiple times for the same email address will not create duplicate contacts | |
| return user.identify({ |
In order to access the leadbi api you need to create a api key in the account section. After the api key is created you can make api calls using the following headers:
GET /api/v1/websites
Host: app.leadbi.com
| var form_id = 3; | |
| // listen to all ajax completed events | |
| jQuery(document).ajaxComplete(function (event, jqXHR, ajaxOptions) { | |
| // try to parse response | |
| var data = JSON.parse(jqXHR.responseText || '{}'); | |
| // check if the ajax request is for our form | |
| if (data.data.form_id == form_id) { |
| <!-- | |
| HTML Integration | |
| Capture form data without javascript (html only) | |
| More documentation: https://gist.github.com/leadbi/a458eb881007c800c045cabfd98ac8af | |
| --> | |
| <!-- the form id is used to capture data only from specific forms --> | |
| <form id="optional-id"> | |
| <input type="text" name="firstname"><br> | |
| <input type="text" name="lastname"> |
When webhooks are used inside an automation, the engine will replace all email placeholders in the url and make a POST request with the content type application/json containing the following data:
// sample data
{
// contact
id: 121324,
// account
'/api/v1/account': ['GET', 'PUT'],
'/api/v1/account/usage': ['GET'],
'/api/v1/account/invoices': ['GET'],
'/api/v1/account/invoices/([0-9]+)/download': ['GET'],
// integrations
'/app/integrations/mailchimp/authorize': ['GET'],
'/app/integrations/mailchimp/callback': ['GET'],
| <?php // SwiftMTA.php | |
| class SwiftMTALogsCursor { | |
| /** | |
| * Create result cursor | |
| */ | |
| public function __construct($api, $query, $result, $limit, $offset){ | |
| $this->api = $api; | |
| $this->limit = $limit; |