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 = "";

Use with CMP

If you are up to deploy Gravito CMP, preferred method is to use SDK to init CMP and provide necessary settings for it. Read more…

Use with CDP

To test SDK connectivity 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 send as query string parameter.