Unlock location data campaign targeting, Braze provides a seamless product integration with Foursquare.

You can use Foursquare’s Pilgrim SDK on iOS and Android to provide real-time event triggering based on location, allowing you to harness Foursquare’s powerful geo-targeting capabilities to send relevant, personalized messaging with Braze.


Be sure that both the Braze and Foursquare Pilgrim SDKs are integrated properly.

After you integrate the Pilgrim SDK, you’ll begin receiving location events on the device or to a webhook.

To properly map between the Braze and Foursquare SDKs, set the same user ID in both systems, using the changeUser method in the Braze SDK and the setUserId method of PilgrimUserInfo in the Pilgrim SDK.

Next, find your App Group and App IDs on the Developer Console section of your Braze account.

Braze Developer Console

Enter your Braze REST API Key and App IDs in the Foursquare Pilgrim Console.

Pilgrim Developer Console

Once you have configured the Pilgrim Console, the Pilgrim SDK will record location events and forward them to Braze, allowing you to retarget and segment qualified customers. See the Foursquare developer site for more details.

Triggering Messages

You can set up a campaign or Canvas that will action off of location events generated by the Pilgrim SDK. This integration route is ideal for real-time messaging right as users enter a venue of interest, or delayed follow-on communication after they’ve left it (e.g. a thank you note or reminder).

Set up an action-based campaign within Braze that will send messages based on a set location. Create a campaign (or a Canvas) in Braze, and set it to send using Action-Based Delivery. For your trigger, use a custom event of arrival with an event property filter for locationType as shown below:

Pilgrim Developer Console


You can use the Pilgrim SDK to set a last_location custom attribute on your Braze users’ User Profiles. You can then use the matches regex comparison to retarget users who went to a particular location in the real world: for example, segmenting all users who were recently at a pizza place.

Pilgrim Developer Console

You can also segment users in Braze who visited a particular type of venue, based on Foursquare’s primaryCategoryId in a particular window of time. To leverage this data point for your retargeting use cases, please log primaryCategoryId as an event property during your audience segmentation process. To identify the users and properties used by the Foursquare API and Pilgrim SDK, please refer to the Foursquare developer site.

New Stuff!