Skip to content

Instantly share code, notes, and snippets.

LeadBI leadbi

Block or report user

Report or block leadbi

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
leadbi /
Last active Aug 28, 2018
LeadBI Dynamic Content

LeadBI Dynamic Content

This feature allows you to pull data from LeadBI into your website pages. Example:

Hello <{{ first_name | Dear Visitor }}>, welcome to our website.

The snippet from above will try to use the first name from LeadBI, if the user is not identified will use "Dear Visitor".

leadbi / leadbi_shop_api.js
Created Mar 5, 2018
LeadBI ECommerce JavaScript API
View leadbi_shop_api.js
// LeadBI Shop API
// Shop.identify(user, callback)
window.$leadbi_website.getCurrentUser(function (err, user) {
return user.getShop(function (err, shop) {
return shop.identify({
first_name: '', // optional
last_name: '', // optional
email: '', // required
leadbi / remove_utm.js
Last active Feb 15, 2018
Remove UTM params from query
View remove_utm.js
(function () {
// remove url param
function removeUrlParam(url, paramName) {
var pattern = new RegExp('\\b(' + paramName + '=).*?(&|$)');
if ( >= 0) {
return url.replace(pattern, '');
return url;
leadbi / LeadBiAPI.php
Last active Jan 19, 2018
LeadBI API PHP Example
View LeadBiAPI.php
* LeadBI API PHP Wrapper
class LeadBiAPI {
* API access id (can be created in Account -> API Keys)
leadbi /
Created Dec 13, 2017
LeadBI Python API Call Example
# LeadBI Python Api call example
import requests
import json
# Examples
# API Calls
leadbi / token_example.php
Last active Sep 28, 2017
SwiftMTA Javacript Logs API
View token_example.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 / form_events.html
Created Sep 24, 2017
LeadBI Form Events Example
View form_events.html
<!DOCTYPE html>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>LeadBI Form Events </title>
<body onload="_load()" style="height: 2000px">
<h1>LeadBI Form Events</h1>
leadbi / SwiftMTA.php
Last active Sep 14, 2017
Swift MTA Simple Logs API
View SwiftMTA.php
<?php // SwiftMTA.php
class SwiftMTALogsCursor {
* Create result cursor
public function __construct($api, $query, $result, $limit, $offset){
$this->api = $api;
$this->limit = $limit;
leadbi /
Created Sep 7, 2017
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 /
Last active May 23, 2017
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,
You can’t perform that action at this time.