Skip to contentSkip to navigationSkip to topbar
On this page
Looking for more inspiration?Visit the
(information)
You're in the right place! Segment documentation is now part of Twilio Docs. The content you are used to is still here—just in a new home with a refreshed look.

Foursquare Movement Source


Source Info
  • The Foursquare Movement Source is an Event Cloud source. This means that it sends data as events, which are behaviors or occurrences tied to a user and a point in time. Data from these sources can be loaded into your Segment warehouses, and also sent to Segment streaming destinations. Learn more about cloud sources.
  • This integration is partner owned. Please reach out to the partner's support for any issues.
(warning)

This Source is supported in US data processing regions.

This Source is only supported in workspaces configured to process data in the US region. Workspaces configured with data processing regions outside of the US cannot connect to this source. For more information, see Regional Segment.

Foursquare's Movement SDK(link takes you to an external page) provides real-time event triggering based upon your users' location in the physical world, allowing you to harness FourSquare's powerful geotargeting capabilities to send those events to other services using Segment.

This destination is maintained by Foursquare. For any issues with the destination, contact the Foursquare Developer support team.

(new)

This document is about a feature in beta

This means the feature is actively being developed, and some functionality may change before it becomes generally available.


Getting started

getting-started page anchor
  1. From the Segment web app, click Catalog.
  2. Search for "Foursquare Movement" in the catalog, select it, and choose which of your sources to connect the it to.
  3. Once you save Foursquare Movement as a source, copy your "Write Key".
  4. Go to your Foursquare Developer Console(link takes you to an external page) and create a new Segment integration in your Foursquare app's Movement SDK console. There you can enter the Segment "Write Key" into the Segment Integration Configuration screen.

The following table lists events that Foursquare's Movement SDK sends to Segment. These events will show up as tables in your warehouse, and as regular events in your other destinations. Foursquare will send through the userId if available.

Event nameDescription
placeArrivalDevice has arrived at a venue. Usually occurs after 3-7 minutes.
placeDepartureDevice has left a visited venue.
placeHistoricalDevice previously arrived or departed a venue, but the device didn't have network connectivity at the time, but Foursquare lets you know as soon as they have connectivity again.
geofenceEnterDevice has entered a venue, polygon or lat/lng geofence.
geofenceDwellDevice has remained within geofence for pre-determined time.
geofenceVenueConfirmedDevice has dwelled within geofence AND Foursquare thinks this is actually the venue the device is at.
geofenceExitDevice has left geofence.

Event properties

event-properties page anchor

The following tables outline the properties included in the events.

Place visit event properties

place-visit-event-properties page anchor

All fields are presented as strings.

Property nameDescriptionValues
addressAddress of visit venueString
cityCity of visit venueString
confidenceHow likely Foursquare thinks it's correctlow, medium, high
countryCountry of visit venueString
crossStreetCross street of visit venueString
latLatitude of eventDouble
lngLongitude of eventDouble
locationTypeIndicates if Foursquare thinks this location is device's home or work, otherwise uses venuework, home, venue
primaryCategoryIdFoursquare Category ID of visit venueString
primaryCategoryNameHuman readable category name of visit venueString
stateAbbreviation of state or province of visit venueString
timestampISO 8601 timestamp of when event happenedTimestamp
venueIdFoursquare ID of visit venueString
venueNameName of visit venueString
visitTypeVisit typearrival, departure, historical
zipCodeZip or postal code for visit venueString

Example:

1
"address": "225 W Ohio St",
2
"city": "Chicago",
3
"confidence": "high",
4
"country": "US",
5
"crossStreet": "",
6
"lat": "41.892114",
7
"lng": "-87.635638",
8
"locationType": "work",
9
"primaryCategoryId": "4bf58dd8d48988d130941735",
10
"primaryCategoryName": "Building",
11
"probability": "0.5112834298670852",
12
"state": "IL",
13
"timestamp": "2020-01-22T15:04:55.000Z",
14
"venueId": "4d21e2ffdd6a236a9c514338",
15
"venueName": "225 West Ohio",
16
"visitId": "5e286497d6d764000801604d",
17
"visitType": "arrival",
18
"zipCode": "60654"

Geofence event properties

geofence-event-properties page anchor
Property nameDescriptionValues
categoryIdsComma separated string of Foursquare category IDsString
geofenceEventTypeGeofence event typevenueEnter, venueDwell, venueConfirmed, venueExit
geofenceIdFoursquare Geofence IDString
geofenceLatLatitude of triggered geofence centerDouble
geofenceLngLongitude of triggered geofence centerDouble
geofenceNameName of triggered geofenceString
geofencePropertiesCustom properties of triggered geofenceKey/value Pair
radiusMinimum 50m, radius of triggered geofenceInt
venueChainIdsComma separated string of Foursquare chain IDsString
venueIdFoursquare ID of geofenced venueString

Example:

1
"categoryIds": "",
2
"geofenceEventType": "venueEnter",
3
"geofenceId": "5dae122e0444bf0008d7f550",
4
"geofenceLat": "41.89213",
5
"geofenceLng": "-87.63534",
6
"geofenceName": "Foursquare Chicago",
7
"geofenceProperties": {},
8
"radius": "100.0",
9
"venueChainIds": "",
10
"venueId": "52af211911d2aa9d4a1f0e0a"

Now that your source is set up, you can connect it to destinations.

Log in to your downstream tools and check that your events appear and contain all the expected properties. If events and properties do not appear, refer to the relevant destination docs for troubleshooting.

If you experience any issues with how the events arrive in Segment, contact the Foursquare team.