Getting started with CDP

Pre-requisite : you have Gravito SDK installed on your project, either as stand-alone or you have done CMP deployment which deploys also SDK by default.

Start Observing

Make a simple call to Gravito:

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

Event name is a name that you can use to distinguish one event from another, the names can be freely assigned but it is recommended to use e.g. camelCase notation and name events like variables.

Key/value pairs are attributes and those values you want to track to the customer profile.

What happens after you make such call? Gravito SDK takes care of the event to be sent to Gravito API. The receiving end will check if there is known observed profile ID associated with the request. If there is not, the backend will set up a new profile for it. Once the profile is known, the backend will store the event data (key/value pairs and event name) on it and respond 204 No Content. This 204 response is to support sending data in also with pixels.

To get observations back to the client you can send request:

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

SDK will take care of making the request to Gravito API and return the profile associated with the requesting domain. Most likely you will do something else with the response data than echoing it to console but you get the point, right?

Start Identifying

Now that you have started observing your customers, the next clear step is to identify them and giving them a customer profile connected with observed profile you just initiated in previous phase. You have two options to start identifying your customer with Gravito:

  1. You already have authentication (user logs in to your website/app somehow)

    Let’s start with sequence of login

    a) Website/app contains form to enter username and password
    b) User enters their credentials and submits
    c) Your backend system receives the submission and validates that the credentials are matching
    d) After successful validation the backend redirects the user to Gravito API with a single use token
    e) Gravito API receives the request and validates it backwards to your backend with single use token
    f) Gravito API redirects the user back to the website/app the login request started

    After perfoming this federation the user is logged in with your backend and simultaneously with Gravito, we have granted the user Gravito UID which links the observed profile to known user profile. Now you are all set for cross-domain, cross-channel and cross-device profile and communication.

  2. You don’t have user authentication but it fits your business? You can add easily Gravito authentication component to your website or application. Find the example projects from our Github.

    For example you can take Gravito client webcomponents and plug those to your website. By default it implements login buttons to element of your choice and you are pretty much done with authentication. However, you still need to implement the authorization part within your website or application if you want to implement any features with access control.

Start Enriching

Once you know the profile , you can enrich the profile with events or directly assign them to segments based on their behavior. You can also send in your preferred marketing consent matrix for Gravito to master. Gravito’s internal profiling lets you assign users to a particular segment when a particular set of events are fulfilled for e.g. Just to be clear, the Enriching can happen even before identifying and then be transferred to the identified profile.

Start Engaging

Now that you have single view of the customer across multiple domains, you can start engaging with your customers wither with the Omni channel marketing capabilities of Gravito or by using your own marketing platform by accepting “Webhooks” from Gravito platform to trigger an action.