Skip to content

Instantly share code, notes, and snippets.

View leadbi's full-sized avatar

LeadBI leadbi

View GitHub Profile
@leadbi
leadbi / leadbi_native_form.html
Last active July 23, 2020 05:32 — forked from andrei-tofan/leadbi_native_form.js
LeadBI Native Form Integration
<!--
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">
@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 / 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 / private_area.js
Last active April 1, 2021 11:28 — forked from andrei-tofan/private_area.js
LeadBI user identification api
// 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({
@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 / 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]]