How We Work Together

Integrating Foursquare with CleverTap can help you optimize your campaigns and realize ROI using real-time, location-based data:

  • Leverage the power of location based context: Send location
    based, contextual push notifications to your users when they’re at or near a specific location in our Places Database or a set of geofences you specify.
  • Build Real-time Segments to Improve Conversion: Smartly target your users based on their visit behaviour and provide personalized experiences according to their visit pattern and history.

Examples of What You Can Do

Integrating with CleverTap opens up a variety of powerful use-cases to help you personalize your users’ experiences:

Drive location-aware messaging across multiple locations so you can maximize the effect of your engagement.

Entice customers with a location-based offer or notify them of an event they can unlock in their vicinity.

Example JSON Payloads

{
    "EventDefinitionKey": "pilgrimArrivalEntrySource",
    "ContactKey": "{String}",
    "Data": {
        "visitType": "arrival",
        "confidence": "{ConfidenceLevel}",
        "lat": "{lat}",
        "lng": "{long}",
        "locationType": "venue",
        "visitId": "{VisitID}",
        "timestamp": "{Timestamp}",
        "venueName": "{VenueName}",
        "venueId": "{VenueID}",
        "primaryCategoryName": "{PrimaryCategoryName}",
        "primaryCategoryId": "{PrimaryCategoryID}",
        "address": "{Address}",
        "crossStreet": "{Cross Street}",
        "city": "{CityName}",
        "state": "{StateCode}",
        "zipCode": "{ZipCode}",
        "country": "{CountryCode}",
        "ContactKey": "{String}",
        "userId": "{String}"
    }
}
{
    "EventDefinitionKey": "pilgrimArrivalEntrySource",
    "ContactKey": "{String}",
    "Data": {
        "geofenceEventType": "presence",
        "geofenceLat": "{Double}",
        "geofenceLng": "{Double}",
        "radius": "{Double}",
        "venueId": "{String}",
        "categoryIds": "{String}",
        "venueChainIds": "{String}",
        "partnerVenueId": "{String}",
        "eventLat": "{Double}",
        "eventLng": "{Double}",
        "geofenceId": "{String}",
        "geofenceName": "{String}",
        "geofenceProperties": {},
        "ContactKey": "{String}",
        "userId": "{String}"
    }
}
{
    "EventDefinitionKey": "pilgrimArrivalEntrySource",
    "ContactKey": "{String}",
    "Data": {
        "geofenceEventType": "exit",
        "geofenceLat": "{Double}",
        "geofenceLng": "{Double}",
        "radius": "{Double}",
        "venueId": "{String}",
        "categoryIds": "{String}",
        "venueChainIds": "{String}",
        "partnerVenueId": "{String}",
        "eventLat": "{Double}",
        "eventLng": "{Double}",
        "geofenceId": "{String}",
        "geofenceName": "{String}",
        "geofenceProperties": {},
        "ContactKey": "{String}",
        "userId": "{String}"
    }
}
{
    "userId": "{String}",
    "eventName": "geofenceEnter",
    "createdAt": 1646691428,
    "dataFields": {
        "geofenceEventType": "entrance",
        "geofenceLat": "{Double}",
        "geofenceLng": "{Double}",
        "radius": "{Double}",
        "venueId": "{String}",
        "categoryIds": "{String}",
        "venueChainIds": "{String}",
        "partnerVenueId": "{String}",
        "eventLat": "{Double}",
        "eventLng": "{Double}",
        "geofenceId": "{String}",
        "geofenceName": "{String}"
    }
}
{
    "userId": "{String}",
    "eventName": "geofenceDwell",
    "createdAt": 1646691515,
    "dataFields": {
        "geofenceEventType": "dwell",
        "geofenceLat": "{Double}",
        "geofenceLng": "{Double}",
        "radius": "{Double}",
        "venueId": "{String}",
        "categoryIds": "{String}",
        "venueChainIds": "{String}",
        "partnerVenueId": "{String}",
        "eventLat": "{Double}",
        "eventLng": "{Double}",
        "geofenceId": "{String}",
        "geofenceName": "{String}"
    }
}
{
    "userId": "{String}",
    "context": {
        "traits": {},
        "device": {}
    },
    "event": "currentLocation",
    "properties": {
        "visitType": "currentLocation",
        "probability": "{Double}",
        "confidence": "{String}",
        "lat": "{Double}",
        "lng": "{Double}",
        "locationType": "{String}",
        "visitId": "{String}",
        "timestamp": "{YYYY-MM-DDTHH:MM:SS.XXXZ}",
        "venueName": "{String}",
        "venueId": "{String}",
        "primaryCategoryName": "{String}",
        "primaryCategoryId": "{String}",
        "primaryChainName": "{String}",
        "primaryChainID": "{String}",
        "address": "{String}",
        "crossStreet": "{String}",
        "city": "{String}",
        "state": "{String}",
        "zipCode": "{String}",
        "country": "{String}",
        "supervenueId": "{String}",
        "supervenueName": "{String}",
        "supervenuePrimaryCategoryId": "{String}",
        "supervenuePrimaryCategoryName": "{String}",
        "supervenuePrimaryChainId": "{String}",
        "supervenuePrimaryChainName": "{String}"
    },
    "type": "track"
}

Integration Details

  1. Make sure both the CleverTap SDK and the Movement SDK are properly setup.
  2. In order to properly map the CleverTap and Foursquare SDKs, you will need to set the same user ID in both systems using the profilePush method in the CleverTap SDK and the setUserId method of UserInfo in the Pilgrim SDK.
  3. From your app’s Integrations page in the Developer Console, add a new CleverTap integration and enter your CleverTap Account Id and Account Password.
  4. If you are outside of the US, please choose the appropriate URL. Learn more here
  5. Select the specific visit and geofence fields you wish to send to CleverTap.
  6. Once you have configured the Developer Console, the Movement SDK will automatically track location events and forward them to CleverTap.