Getting started

A brief intro to Gravito SDK.

Gravito SDK gives you all general powers to communicate with Gravito APIs. Include Gravito SDK to your project:

var gravitoSdkTag = document.createElement("script");
gravitoSdkTag.src = "";

To test it out you can call Gravito API and fetch the profile about the current device (and user if logged in):

gravito.getProfile(function(data) { console.log(data); });

To send data to profile:

gravito.sendEvent("<event name>","key1=value1&key2=value2");

Above call will create a pixel call on which the second parameter is sent as query string parameters.