Submitting Data to Leadboxer

Inserting events with a url

LeadBoxer enables you to log and store any activity that can send a signal via the internet. These signals are events. By implementing this API, it is possible to securely track, monitor, and generate real-time reports for any device connected to the internet.

There are multiple libraries to make it easy for you to start sending us the events. The libraries send their data by submitting an event to our logging servers with a secure https request to:

https://log.leadboxer.com

Our data collection service has been designed for ease of use, real-time reports, speed, redundancy and fault tolerance. Scaling automatically when high event volume is detected. Real-time reports are generated on the fly. You can send event data with either  GET or POST requests.

This chapter describes the basics of sending us events as raw URLs over the https protocol.

Why would I want to insert events using raw URLs?

Sending raw urls is the preferred method if you do not want to pass the data automatically with our libraries/ SDKs. Examples for doing this include testing/ development purposes, the need for flexibility, using/ designing your own libraries, or if you are developing in an environment that does not give access to LeadBoxer's libraries/ SDK's.

Example

A simple example is to send an event that only contains a title, we'll use the abbreviation ti (which happens to be the reserved property for displaying titles in LeadBoxer's user interface).
We'll need to pass the site (si) property. This is a mandatory property that needs to be passed with all requests sent. The tells the engine which site/ account the data is being inserted for. You'll need to  register an account to use all features.

Just click on the following link, to send an event with the ti property set:

https://log.leadboxer.com/?ti=Please track me&si=your-dataset-ID

That's a really simple request! This will add a single event to your dataset with the title ti set to  Please track me, and the site credentials si set to your-registered-app-name

LeadBoxer creates an event id (the hex returned from the request), a session id and an user id both have their title ti property set to Please track me. This helps the developer display particular information related to the id's.

And theres more! you get two counters (a unique id counter and normal counter) with segmentation built in. These features are the building blocks of real-time analytic reporting.

Valid naming

The property name has to be ascii characters.
The value can be any  url encoded string.

User properties

By sending us events with properties, you can add property information to the user profile.

Adding properties to an existing user or session

You can add properties to existing sessions or users, by providing both the uid and sid.

Example

https://log.leadboxer.com/?si=your-dataset-ID&sid=12345678&uid=123345656&email=test@leadboxer.com

Updating an existing website visitor

In order to update an existing user (lead) you need to know the LeadBoxer user ID. 

You can get the LeadBoxer user ID by reading this from the Cookie, with the following javascript function:

ot_uid();

Here is an example from the console

So by using that UserID to the API call, you can update an existing user

Example to update an existing user with an email address

https://log.leadboxer.com/?si=your-dataset-ID&sid=12345678&uid=1606468777834.459913894&email=test@leadboxer.com

Using a proxy

By inserting events with a raw url, some properties are automatically filled. This includes the computer or browser (from the requests user agent) and are the country/ region/ city and session end unix timestamp, are automatically detected and will overwrite the current values of the user.

Sometimes you don't need this, so to prevent this from happening the proxy property can be set to a value of true.

Example

https://log.leadboxer.com/?si=your-dataset-ID&sid=12345678&uid=123345656&email=test@leadboxer.com&proxy=true

Return formats & callback

The default return value is always the event id, usually generated by the engine

You override this feature, by passing the format needed of the returned value:
&pix will return a 1x1 pixel
&json will return the event id as json

If a callback parameter is received (which is what jquery will call with its jsonp algorithm, then the returned json is formatted as jsonp, otherwise it is formatted as json see for details http://docs.jquery.com/Ajax/jQuery.getJSON , eg callback=jQueryCallback)

https://log.leadboxer.com/?si=your-dataset-ID&sid=12345678&uid=123345656&email=test@leadboxer.com&proxy=true&json&callback=jQueryCallback

Still need help? Contact Us Contact Us