Skip to content

Instantly share code, notes, and snippets.

View leadbi's full-sized avatar

LeadBI leadbi

View GitHub Profile
@leadbi
leadbi / leadbi_api.md
Created May 5, 2017 11:47 — forked from andrei-tofan/leadbi_api.md
LeadBI API access documentation

LeadBI API Access

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:

  • X-Access-Id - api key id
  • X-Access-Secret - api key secret

Request Example

GET /api/v1/websites
Host: app.leadbi.com
@leadbi
leadbi / leadbi_tracking_fields.md
Created May 11, 2017 12:52
LeadBI Tracking Fields

LeadBI Tracking Fields

This is a list of fields that can be used to send data from email campaigns to leadbi.

Example

https://www.leadbi.com/?utm_email=hi@leadbi.com&utm_firstname=Andrei&utm_lastname=Example

Fields

Contact Fields:

@leadbi
leadbi / leadbi_webhook_data.md
Last active May 23, 2017 07:51
LeadBI Automation Webhook Data

LeadBI Automation Webhook Data

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,
@leadbi
leadbi / leadbi_native_forms.md
Last active May 26, 2017 06:24 — forked from andrei-tofan/leadbi_native_forms.md
LeadBI Native Forms Integration

LeadBI Native Forms Integration

LeadBI Native Forms allows you to capture data from existing website forms.

Target a specific form

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.

Form Attributes

  • Email - any input with the text 'email' in the name field or any input with the attribute data-leadbi-email="true"
  • Full Name - any input with the text 'full?name' in the name field or any input with the attribute data-leadbi-full-name="true"
@leadbi
leadbi / ninja-forms.js
Created May 5, 2017 11:48 — forked from andrei-tofan/ninja-forms.js
Ninja Forms JavaScript Hook
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) {
@leadbi
leadbi / api_calls.md
Created September 7, 2017 14:20
LeadBI API Calls
// 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'],
@leadbi
leadbi / SwiftMTA.php
Last active September 14, 2017 12:21
Swift MTA Simple Logs API
<?php // SwiftMTA.php
class SwiftMTALogsCursor {
/**
* Create result cursor
*/
public function __construct($api, $query, $result, $limit, $offset){
$this->api = $api;
$this->limit = $limit;
@leadbi
leadbi / form_events.html
Created September 24, 2017 14:27
LeadBI Form Events Example
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>LeadBI Form Events </title>
</head>
<body onload="_load()" style="height: 2000px">
<h1>LeadBI Form Events</h1>
@leadbi
leadbi / token_example.php
Last active September 28, 2017 18:47
SwiftMTA Javacript Logs API
<?php
$username = 'dwtgroup';
$password = 'change_me';
$expire = date("c",strtotime("+1 day"));
$alg = 'sha256';
// generate authorization
$authorization = "$username;$expire;$alg";
$authorization = $authorization . ";" . hash_hmac($alg, $authorization, $password);
?>
@leadbi
leadbi / leadbi_email_placeholders.md
Last active November 20, 2017 13:44 — forked from andrei-tofan/leadbi_email_placeholders.md
LeadBI Email Automation Placeholders

LeadBI Email Automation Placeholders

Placeholders allows you to create personalized emails content and urls.

Usage

[[placeholder_name]] - will be replaced with the value of the placeholder.

Available Placeholders

Contact

  • [[first_name]]
  • [[last_name]]