Version 2 (Latest)

Using SDK V2

To use Gravito’s SDK you should have the Gravito config added to your site. Make sure you also have settings section added inside your config. You can get the config from the Gravito Admin Portal

👉Looking for an older version of Gravito SDK? You can find the older versions here

Gravito SDK V1

How it works?

Configuration

SDK Version can be configured using gravitoCMPConfig object.

window.gravitoCMPConfig = {
  settings: {
    sdkVersion: 2,
  },
};

Deployment

To Include Gravito SDK Version 2 add following JavaScript to your site. Make sure config loading logic is added above this script.

var gravitoSDKTag = document.createElement("script");
gravitoSDKTag.src = "https://cdn.gravito.net/sdkv2/latest/sdk.js";
gravitoSDKTag.onload = function () {
  console.log("gravito SDK loaded");
};
document.body.appendChild(gravitoSDKTag);

Sample Scripts

Using SDK to deploy First-Party. To include first-party helper functions of SDK V2 add following JavaScript to your site. Make sure config loading logic is added above this script.

var gravitoSDKTag = document.createElement("script");
gravitoSDKTag.src = "https://cdn.gravito.net/sdkv2/latest/sdk.js";
gravitoSDKTag.onload = function () {
  window.gravito.init("firstParty");
};
document.body.appendChild(gravitoSDKTag);

To check if the first party has been added to your site or not, please use following script and test it with browser console window. It should return your gravito registered first-party URL

gravito.firstParty.getDefaultURL();

Once First-party is added to your website you can use the first-party function to interact with gravito backend.

Get Your profile.

To get your profile you can call following function

function customCb(data) {
  console.log("data", data);
}
gravito.firstParty.getProfile(customCb);
Have your own First Party Id?

Using gravito first-party you can use your own ID and give it more persistence using Gravito First Party API

function customCb(data) {
  console.log("data", data);
}
var gmId = "your own id";
gravito.firstParty.postEvents(
  {
    "gmId-overide": "gmid changed to " + gmId,
  },
  customCb,
  gmId
);
Send a Key value pair of events.

You can attach key-value pairs to the profile for eg: pageViews : n

function customCb(data) {
  console.log("data", data);
}
let key = "pageViews";
let value = 2;
let model = {};
model[key] = value;
gravito.firstParty.postEvents(model, customCb);
Send a Keys to the Profile.

Attach keys to the profile to get a complete picture of the profile. eg: GA ID.

function customCb(data) {
  console.log("data", data);
}
let keysInput = [
  {
    i: "56396541p-0jud-7qawe-lk45ue973723",
    K: "GAID",
    v: "56396541p-0jud-7qawe-lk45ue973723",
  },
];

gravito.firstParty.postKeys(keysInput, customCb);

Attach consents to the profile to access it any time.

function customCb(data) {
  console.log("data", data);
}
let consentInputs = [
  { i: "t", c: "consent1", s: false },
  { i: "m", c: "consent2", s: false },
];

gravito.firstParty.postConsents(consentInputs, customCb);
Bridge in Match On id.

Connect with matchOnId ( eg: a deterministic Id) to connect X-domain and X-device.

function customCb(data) {
  console.log("data", data);
}
let matchOnId = "your_match_onId";

gravito.firstParty.attachMatchOnId(matchOnId, customCb);
Reset Profile.

To reset your firstParty profile use following snippet.

function customCb(data) {
  console.log("data", data);
}
let matchOnId = "reset";

gravito.firstParty.attachMatchOnId(matchOnId, customCb);
Delete Profile.

To delete your firstParty profile use following snippet

function customCb(data) {
  console.log("data", data);
}
let matchOnId = "delete";

gravito.firstParty.attachMatchOnId(matchOnId, customCb);

Using SDK to deploy Light CMP.

To know how to deploy light CMP with SDK v2 please click here(Link to Deployment section of Light CMP).

Using SDK to deploy TCF CMP.

To know how to deploy TCF CMP with SDK v2 please click here(Link to Deployment section of TCF CMP ).

Using SDK to Include Gravito’s prebid js usermodule.

To know how to include Gravito’s prebid js usermodule with SDK v2 please click here(Link to Deployment section of prebid js usermodule).

👉Looking for an older version of Gravito SDK? You can find the older versions here

Gravito SDK V1

Documentation

Getting started

Frequently Asked Questions

Frequently Asked Questions (FAQ) - Gravito Intelligent CMP and TCF 2.2 CMP Banner. 1. What is Gravito? Gravito is a Consent Banner provider for websites. It offers both TCF (Transparency & Consent Framework 2.2 ) certified Consent Management Platforms (CMPs) for...

Register

Before you can start using Gravito features you will need to register yourself in the Gravito portal. Head to https://admin.gravito.net and enter your email you want to use with Gravito: After submission you will receive an email with PIN code, enter that to...

Support

All support cases and issues are handled by the support team of Gravito or by technology partners. In case you need support please send us email at support<at>gravito.net Be part of our community? Join us on our Discord Channel here

Gravito Intelligent CMP

Getting Started

Gravito Intelligent CMP is a consent management solution that helps to collect consent for data collection, analytics, targeting, personalization and whatever your business needs to fulfil legal or regulatory terms. 💡 NoteHave you registered with Gravito yet? Please...

Setup and Design

Gravito Intelligent CMP Setup can be done using Gravito CMP Configurator on Gravito's Admin Portal. Go to CMP>>Gravito CMP configurator. You can choose the language of your choice when creating your own CMP Config Do you want to try out how our configuration is? You...

GTM Template

Gravito CMP now can be deployed using GTM Template. In order to use this feature, while creating the configuration for Gravito CMP you will have to check the "Is GTM?" flag in the basic section of the configuration wizard. If the config is created using the "is GTM? "...

Release Notes

Gravito Intelligent CMP release notes. Version 4.0.0 New major release SDK v2 compatibility. Feature to capture CMP events such as Accept-All, and Reject-All, and have a report generated on the Admin portal. Prebid.js user Id support with Light CMP. Version 3.0.0 New...

Advanced Features

Here are the links to the advanced features supported by Gravito Intelligent CMP Customization Advanced Customization Options Latest Gravito Configuration example (json) Headless CMP using Gravito Integrations How to integrate events emitted by the Gravito Intelligent...

Gravito TCF 2.2 CMP

Getting Started

Gravito CMP provides a TCF 2.2 compliant consent management platform. With Gravito you can customize the look and feel of your CMP so that it blends good with your website. Gravito TCF 2.2 CMP is also listed as one of the Google Certified TCF CMP's To get started you...

Setup and Design

Gravito TCF 2.2 CMP Setup can be done using TCF CMP Configurator on Gravito’s Admin Portal. Go to CMP>>TCF configurator.

Mobile apps

TCF CMP implementation on mobile apps can take two different strategies: You have TCF CMP already configured and set up for your website or you are planning to have such AND your application is made with webviews (= content is displayed on webviews and 3rd party...

Release Notes

Version 4.0.0New Major Release : Compatible with Gravito's TCF 2.2 CMP Enhancements: Disclosure Details Toggle: We've upgraded the functionality of the "Disclosure Details" button under each vendor. It now serves as a toggle button, allowing you to easily show or hide...

Advanced features

Here are few of the advanced features of Gravito TCF 2.2 CMP Integration How to integrate with events emitted by Gravito TCF 2.2 CMP? Customization Latest Gravito TCF 2.2 CMP Configuraton example (json)

Gravito SDK

Getting Started

The Gravito SDK ( Latest Version 2) is a tool that allows developers to communicate with the Gravito APIs and deploy both light CMP and TCF CMP. It includes functions for interacting with the Gravito first party backend solution and is used by all major services...

Release Notes

Release Notes ( V2 ) Gravito SDK Version 2 now uses a modular approach to avoid unnecessary imports of files into your website. You can configure which modules you want to use at the time of initialization process. Currently, it supports four modules: LightCMP,...

Gravito API

Getting Started

Gravito API is a powerful tool when it comes to collecting consent statistics while allowing you to connect multiple ids that you use in your setup and give it more persistence. One of the key features of the Gravito API, the Gravito ID Connector is enabled using the...

Setup and Validation

First Party domain means the domain your website operates. e.g. website.com. To avoid third party cookies being blocked (occurs already on many browsers) you can configure the CMP to set the cookies under first party domain or you can use Gravito's first party API to...

Version 3 (Latest)

First party API / Microprofile As discussed in the previous version 2, most common use for first party microprofile is to store CMP consents and other metadata on it. In version 3 we have added a whole new set of features to manage observations, consents and key rings...

Version 2

First party API / Microprofile Most common use for first party microprofile is to store CMP consents and other metadata on it. That configuration is automatically generated by CMP configurator, just select “with backend” option when generating the deployment script...

Microprofile

Microprofile which relies on Gravito Firstparty API v3 is in Beta testing Gravito Microprofile is sort of a synonym to first party API. First party API was initially developed as simple microservice to help with setting first party cookie to hold CMP settings and...

Other  Features

Cookie Scanner

Cookie Scanner Gravito allows you to scan your web pages for cookies dropped. Gravito classifies cookies on your webpage as ones dropped before accepting the consent and ones after accepting the consent. This way there is a clear understanding of what is happening on...

GVL Comparison

Gravito allows you to compare global vendor list versions. You can get specific details like which vendors were updated, added as well as deleted from the comparison tool You can find the GVL comparison tool under the Features -> GVL Updates menu You can choose the...

Prebid User Id Module

Gravito has a user module in prebid js, customers now can use Gravito's first party service and prebid js usermodule to use a persistent first party id in prebid's bit stream. More details in the each section below. Getting Started Setup and Validation Version 1...

Try it out

Playbooks

Quick guides to get started with various deployment scenarios. Deploy basic consent management banner and wire the tags on it Register/login to https://admin.gravito.net Navigate to CMP > Gravito CMP configurator > New Configuration Create configuration, you...