CleverTap Integration

Background

Bluedot is a location platform that provides an accurate and simple geofencing platform for apps. After integrating the Bluedot SDK and setting geofences, customers can create personalized location-based experiences for their users.

CleverTap enables mobile marketers to analyze, segment, engage, and measure their mobile marketing efforts. The mobile marketing platform combines real-time customer insights, an advanced segmentation engine, and powerful engagement tools into one intelligent marketing platform, making it easy to collect, analyze, and act on customer insights in milliseconds.

Integration architecture diagram

Bluedot setup

Creating a new Project

Create a Project is your first step. All your Zones and all geofences exist with a Project.
1. From the Project, dropdown select the Add new project button
Create a Project

2. Give the Project a name and the Create button
3. And that’s it!
Add a Zone

More Information

More information on adding and managing Bluedot Point Access Apps can be found here.

Adding a Zone

You’ll need to create a Zone before you can start adding in specific Geofences. Each Zone can have one or many Geofences – that’s up to you and your use-case.

1. Head to the Dashboard screen
2. Check your using the right Project (the Project dropdown is at the top of the screen)
3. Click the + Add Zone button
Add a Zone

4. Give you Zone a name
5. Search for the address or point-of-interest (POI) where you’d like to create the geo-fence
Search for an address

6. Add at least one Geo-fence
Add a Geo-fence

7. Click Create

App setup

The application needs to be configured to send events to CleverTap when a Bluedot entry or exit trigger occurs. The Android/Java implementation for passing up entry events is as follows, using the onCheckIntoFence callback:

@Override
public void onCheckIntoFence(FenceInfo fenceInfo, ZoneInfo zoneInfo, LocationInfo locationInfo, Map<String, String> customDataMap, boolean mayCheckOut) {
    // Callback triggered when a Bluedot entry trigger occurs.
    CleverTapAPI cleverTap = CleverTapAPI.getDefaultInstance(getApplicationContext());
    // Setup a hashmap/dictionary object to contain the data.
    HashMap<String, Object> bluedotEntryEvent = new HashMap<String, Object>
    // Add data relevant to the use case
    bluedotEntryEvent.put("bluedot_zone_id", zoneInfo.getZoneId());
    bluedotEntryEvent.put("bluedot_zone_name", zoneInfo.getZoneName());
    if(customDataMap != null && !customDataMap.isEmpty()) {
        // This allows data set on the Bluedot UI/Config API against the
        // location to be sent as an attribute of the event to CleverTap.
        for(Map.Entry<String, String> data : customDataMap.entrySet()) {
            bluedotEntryEvent.put(data.getKey(), data.getValue());
        }
    }

    // Push the prepared event to CleverTap for use in analytics and to
    // trigger any appropriate campaign.
    cleverTap.event.push("bluedot_entry", bluedotEntryEvent);
}

To pass up Bluedot exit triggers, similar code should be added for the onCheckedOutFromFence callback.

CleverTap setup

We use custom events to trigger Campaigns in CleverTap. Once you follow the steps above under Bluedot Setup, you will start seeing Bluedot events arriving in the CleverTap dashboard as Bluedot zones are triggered. Once those events have been registered with CleverTap, you can then use these in analytics and to kick off engagement journeys.

Setting up a CleverTap journey powered by Bluedot

ClerverTap journery

To set up a CleverTap journey triggered by a user entering or exiting a location, drag and drop an “Action” into the entry criteria field. Once the entry criteria look like the image above, click it and fill out the basic requirements for the journey. In the second section, select “+ Create an ad-hoc segment”.
Create a segment

Here, you can select the bluedot_place_entered or bluedot_place_exited events as the triggering event, and add filters to specify under which circumstances a journey should be triggered (in the above example, when the a_custom_field attribute equals with_custom_data, which might be populated from Bluedot zone custom data).
Create a build

Once the action entry criteria is setup, standard CleverTap behaviors can be defined, all triggered by the user’s interaction with a physical location.

More information on CleverTap Journeys can be found here.

Integration examples

Android – https://github.com/Bluedot-Innovation/PointSDK-CleverTapIntegrationExample-Android

iOS – https://github.com/Bluedot-Innovation/PointSDK-CleverTapSDK-IntegrationExample-iOS

Contact Details

If you have any technical issues or questions you please use help@bluedot.io to reach out to our Melbourne-based Engineering team.

Created by Ram Akunuru on February 12, 2020

Start the discussion