Radar can send events and user attributes to Braze .
Use the Braze integration to send location-triggered and location-targeted messages to increase engagement and conversion.
Configuration# On the Braze API Keys page under Rest API Keys , create and copy a new workspace API key with users.track
permissions. Under Identification , copy your iOS and Android app identifiers.
Then, on the Radar Integrations page under Braze , set Enabled to Yes and paste your API key and app identifiers. Note that you can set separate API keys and app identifiers for the Test and Live environments. Finally, if your account is not on https://rest.iad-01.braze.com
, select the appropriate API Endpoint .
Whenever events are generated, Radar will send custom events and user attributes to Braze. Events and user attributes from iOS devices will be sent using your iOS app identifiers, and events and user attributes from Android devices will be sent using your Android app identifiers.
By default, Radar userId
maps to Braze external_id
for logged in users. However, you can track logged out users or specify custom mappings by setting Radar metadata.brazeAlias
or metadata.brazeExternalId
. If you set metadata.brazeAlias
, you must also add a matching alias in Braze with label radarAlias
.
Radar . setMetadata ( [ "brazeAlias" : deviceId ] ) AppDelegate . braze ? . user . addAlias ( deviceId , withLabel : "radarAlias" )
Radar . setMetadata ( [ "brazeExternalId" : userId ] ) AppDelegate . braze ? . changeUser ( userId : userId )
Copy Radar . setMetadata ( JSONObject ( ) . put ( "brazeAlias" , deviceId ) ) Braze . getInstance ( context ) . currentUser ? . addAlias ( deviceId , "radarAlias" )
Radar . setMetadata ( JSONObject ( ) . put ( "brazeExternalId" , userId ) ) Braze . getInstance ( context ) . changeUser ( userId )
Copy Verify integration data delivery# To test that the integration is configured correctly and can deliver data, use the Simulator to generate events. Click View on an event row and scroll down to the Logs section on the details page to verify delivery. Perform a similar process via a test app build with Radar location tracking enabled by spoofing location or moving into the relevant boundary.
All integration delivery can be monitored via the integration's event logs by clicking View event logs on the Integrations page .
Example use cases# Send a personalized push notification when a user arrives at a store# Create Geofences in Radar with the geofence tag set to store
. The geofence tag will be used to trigger messages for the subset of geofence entries where this tag is present. Set up a Braze campaign triggered from the Radar geofence entry event, the entered_geofence
custom event in Braze, and add property filtering where geofence_tag
is store
. These same events can be used as part of a Braze Canvas and the event properties can be used in message personalization with Liquid .
Message all users nearby a store# Create Geofences in Radar to represent nearby store boundaries with geofence tag set to nearby-store
. The geofence tag will be used to target messages for the subset of geofences where this tag is present. Set up a Braze campaign targeted with the radar_geofence_tags
user attribute that Radar sends. This will be an array of all geofences the user is currently in, so set the attribute to include the value of nearby-store
. Additional attribute filtering can be performed for more complex targeting, including how recently the location was updated via the radar_updated_at
user attribute.
In-app messaging# To trigger in-app messaging from the user state detected on app open, custom events need to deliver through Braze's SDK rather than via Radar's server to server integration with Braze. To support this, implement custom logic in the SDK leveraging Radar's location update listener, on iOS or Android , to send foreground detections to Braze. The example code below assumes you are calling Radar.trackOnce()
on application launch. See the iOS and Android tracking references if needed.
import RadarSDK import Appboy_iOS_SDK
@UIApplicationMain class AppDelegate : UIResponder , UIApplicationDelegate , RadarDelegate {
func didUpdateLocation ( _ location : CLLocation , user : RadarUser ) { if ( user . foreground && user . source == RadarLocationSource . foregroundLocation ) { if let geofences = user . geofences { var customEventProperties = [ String : Array < String > ] ( ) customEventProperties [ "radar_geofence_descriptions" ] = geofences . compactMap ( { $ 0 . __description } ) customEventProperties [ "radar_geofence_tags" ] = geofences . compactMap ( { $ 0 . tag } ) customEventProperties [ "radar_geofence_external_ids" ] = geofences . compactMap ( { $ 0 . externalId } ) Appboy . sharedInstance ( ) ? . logCustomEvent ( "radar_fg_geofences_entered" , withProperties : customEventProperties ) } if let place = user . place { var customEventProperties = [ String : Any ] ( ) customEventProperties [ "radar_place_name" ] = place . name customEventProperties [ "radar_place_categories" ] = place . categories customEventProperties [ "radar_place_chain_slug" ] = place . chain ? . slug ? ? "" Appboy . sharedInstance ( ) ? . logCustomEvent ( "radar_fg_place_entered" , withProperties : customEventProperties ) } } return } }
Copy class MyRadarReceiver : RadarReceiver ( ) { override fun onLocationUpdated ( context : Context , location : Location , user : RadarUser ) { var userGeofences = user . geofences var userPlace = user . place if ( userGeofences != null && userGeofences . isNotEmpty ( ) ) { var eventPropertiesJson = JSONObject ( ) eventPropertiesJson . put ( "geofenceTags" , userGeofences . map { it . tag } ) eventPropertiesJson . put ( "geofenceDescriptions" , userGeofences . map { it . description } ) eventPropertiesJson . put ( "geofenceExternalIds" , userGeofences . map { it . externalId } ) var eventProperties = BrazeProperties ( eventPropertiesJson ) Braze . getInstance ( context ) . logCustomEvent ( "radar_fg_geofences_entered" , eventProperties ) } if ( userPlace != null ) { var eventPropertiesJson = JSONObject ( ) eventPropertiesJson . put ( "placeChainSlug" , userPlace . chain ? . slug ?: "" ) eventPropertiesJson . put ( "placeName" , userPlace . name ) eventPropertiesJson . put ( "placeCategories" , userPlace . categories . toList ( ) ) var eventProperties = BrazeProperties ( eventPropertiesJson ) Braze . getInstance ( context ) . logCustomEvent ( "radar_fg_place_entered" , eventProperties ) } } }
Copy Connected content# Radar APIs can be used in Braze connected content. See Braze's documentation for a connected content example. Use the API explorer in the dashboard to test relevant APIs.
User mapping# Note that Radar uses the special string "(null)"
to represent null
user attribute values.
Radar User Field Braze User Attribute Type Example Value Context Type metadata.brazeExternalId
or userId
external_id
string "1"
metadata.brazeAlias
radarAlias
string "10974a2ee035770b9"
location
current_location
location (39.525665, -76.350663)
_id
radar_id
string "5b2c0906f5874b001aecfd8d"
updatedAt
radar_updated_at
timestamp "2018-06-22T15:23:39.000Z"
locationAuthorization
radar_location_authorization
string "GRANTED_FOREGROUND"
locationAccuracyAuthorization
radar_location_accuracy_authorization
string "FULL"
segments[*].externalId
radar_segment_external_ids
array[string] ["starbucks-visitors"]
topChains[*].slug
radar_top_chain_slugs
array[string] ["starbucks", "walmart"]
topChains[*].externalId
radar_top_chain_external_ids
array[string] ["123", "456"]
geofences[*]._id
radar_geofence_ids
array[string] ["5b2c0906f5874b001aecfd8e"]
Geofences geofences[*].description
radar_geofence_descriptions
array[string] ["Store #123"]
Geofences geofences[*].tag
radar_geofence_tags
array[string] ["store"]
Geofences geofences[*].externalId
radar_geofence_external_ids
array[string] ["123"]
Geofences place._id
radar_place_id
string "59302bcf8f27e8a156bd4f91"
Places place.name
radar_place_name
string "Starbucks"
Places place.categories
radar_place_categories
array[string] ["food-beverage", "cafe", "coffee-shop"]
Places place.chain.slug
radar_place_chain_id
string "starbucks"
Places place.chain.name
radar_place_chain_name
string "Starbucks"
Places country.code
radar_region_country_code
string "US"
Regions country.name
radar_region_country_name
string "United States"
Regions state.code
radar_region_state_code
string "MD"
Regions state.name
radar_region_state_name
string "Maryland"
Regions dma.code
radar_region_dma_code
string "26"
Regions dma.name
radar_region_dma_name
string "Baltimore"
Regions postalCode.code
radar_region_postal_code
string "21014"
Regions trip.externalId
radar_trip_external_id
string "299"
Trip Tracking trip.destinationGeofenceTag
radar_trip_destination_geofence_tag
string "store"
Trip Tracking trip.destinationGeofenceExternalId
radar_trip_destination_geofence_external_id
string "123"
Trip Tracking beacons[*]._id
radar_beacon_ids
array[string] ["5b2c0906f5874b001aecfd8f]"
Beacons beacons[*].description
radar_beacon_descriptions
array[string] ["Store #123 - Drive-Thru"]
Beacons beacons[*].tag
radar_beacon_tags
array[string] ["drive-thru"]
Beacons beacons[*].externalId
radar_beacon_external_ids
array[string] ["123"]
Beacons
Event mapping# Radar Event Context Type Braze Event user.entered_geofence
Geofences entered_geofence
user.exited_geofence
Geofences exited_geofence
user.dwelled_in_geofence
Geofences dwelled_in_geofence
user.entered_place
Places entered_place
user.exited_place
Places exited_place
user.entered_region_country
Regions entered_country
user.exited_region_country
Regions exited_country
user.entered_region_state
Regions entered_state
user.exited_region_state
Regions exited_state
user.entered_region_dma
Regions entered_dma
user.exited_region_dma
Regions exited_dma
user.started_trip
Trip Tracking started_trip
user.updated_trip
Trip Tracking updated_trip
user.approaching_trip_destination
Trip Tracking approaching_trip_destination
user.arrived_at_trip_destination
Trip Tracking arrived_at_trip_destination
user.stopped_trip
Trip Tracking stopped_trip
user.entered_beacon
Beacons entered_beacon
user.exited_beacon
Beacons exited_beacon
entered_geofence# Radar Event Field Braze Event Property Type Example Value geofence._id
geofence_id
string "5b2c0906f5874b001aecfd8e"
geofence.description
geofence_description
string "Store #123"
geofence.tag
geofence_tag
string "store"
geofence.externalId
geofence_external_id
string "123"
geofence.metadata[{key}]
geofence_metadata_{key}
{type} {value}
confidence
confidence
string "high"
foreground
foreground
boolean true
If Regions is enabled, Radar will also send the following attributes:
Radar Event Field Braze Event Property Type Example Value country.code
country_code
string "US"
country.name
country_name
string "United States"
state.code
state_code
string "MD"
state.name
state_name
string "Maryland"
dma.code
dma_code
string "26"
dma.name
dma_name
string "Baltimore"
postalCode.code
postal_code
string "21014"
exited_geofence# Radar Event Field Braze Event Property Type Example Value geofence._id
geofence_id
string "5b2c0906f5874b001aecfd8e"
geofence.description
geofence_description
string "Store #123"
geofence.tag
geofence_tag
string "store"
geofence.externalId
geofence_external_id
string "123"
geofence.metadata[{key}]
geofence_metadata_{key}
{type} {value}
confidence
confidence
string "high"
duration
duration
number (minutes) 42.1
foreground
foreground
boolean true
If Regions is enabled, Radar will also send the following attributes:
Radar Event Field Braze Event Property Type Example Value country.code
country_code
string "US"
country.name
country_name
string "United States"
state.code
state_code
string "MD"
state.name
state_name
string "Maryland"
dma.code
dma_code
string "26"
dma.name
dma_name
string "Baltimore"
postalCode.code
postal_code
string "21014"
dwelled_in_geofence# Radar Event Field Braze Event Property Type Example Value geofence._id
geofence_id
string "5b2c0906f5874b001aecfd8e"
geofence.description
geofence_description
string "Store #123"
geofence.tag
geofence_tag
string "store"
geofence.externalId
geofence_external_id
string "123"
geofence.metadata[{key}]
geofence_metadata_{key}
{type} {value}
confidence
confidence
string "high"
duration
duration
number (minutes) 5
foreground
foreground
boolean true
If Regions is enabled, Radar will also send the following attributes:
Radar Event Field Braze Event Property Type Example Value country.code
country_code
string "US"
country.name
country_name
string "United States"
state.code
state_code
string "MD"
state.name
state_name
string "Maryland"
dma.code
dma_code
string "26"
dma.name
dma_name
string "Baltimore"
postalCode.code
postal_code
string "21014"
entered_place# Radar Event Field Braze Event Property Type Example Value place._id
place_id
string "59302bcf8f27e8a156bd4f91"
place.name
place_name
string "Starbucks"
place.chain.slug
place_chain_id
string "starbucks"
place.chain.name
place_chain_name
string "Starbucks"
place.chain.externalId
place_chain_external_id
string "123"
place.chain.metadata[{key}]
place_chain_metadata_{key}
{type} {value}
place.categories
place_categories
string (comma-separated) "food-beverage,cafe,coffee-shop"
confidence
confidence
string "high"
foreground
foreground
boolean true
If Regions is enabled, Radar will also send the following attributes:
Radar Event Field Braze Event Property Type Example Value country.code
country_code
string "US"
country.name
country_name
string "United States"
state.code
state_code
string "MD"
state.name
state_name
string "Maryland"
dma.code
dma_code
string "26"
dma.name
dma_name
string "Baltimore"
postalCode.code
postal_code
string "21014"
exited_place# Radar Event Field Braze Event Property Type Example Value place._id
place_id
string "59302bcf8f27e8a156bd4f91"
place.name
place_name
string "Starbucks"
place.chain.slug
place_chain_id
string "starbucks"
place.chain.name
place_chain_name
string "Starbucks"
place.chain.externalId
place_chain_external_id
string "123"
place.chain.metadata[{key}]
place_chain_metadata_{key}
{type} {value}
place.categories
place_categories
string (comma-separated) "food-beverage,cafe,coffee-shop"
confidence
confidence
string "high"
duration
duration
number (minutes) 42.1
foreground
foreground
boolean true
If Regions is enabled, Radar will also send the following attributes:
Radar Event Field Braze Event Property Type Example Value country.code
country_code
string "US"
country.name
country_name
string "United States"
state.code
state_code
string "MD"
state.name
state_name
string "Maryland"
dma.code
dma_code
string "26"
dma.name
dma_name
string "Baltimore"
postalCode.code
postal_code
string "21014"
entered_country# Radar Event Attribute Braze Event Property Type Example Value region.code
region_code
string "US"
region.name
region_name
string "United States"
confidence
confidence
string "high"
foreground
foreground
boolean true
exited_country# Radar Event Attribute Braze Event Property Type Example Value region.code
region_code
string "US"
region.name
region_name
string "United States"
confidence
confidence
string "high"
foreground
foreground
boolean true
entered_state# Radar Event Attribute Braze Event Property Type Example Value region.code
region_code
string "MD"
region.name
region_name
string "Maryland"
confidence
confidence
string "high"
foreground
foreground
boolean true
exited_state# Radar Event Attribute Braze Event Property Type Example Value region.code
region_code
string "MD"
region.name
region_name
string "Maryland"
confidence
confidence
string "high"
foreground
foreground
boolean true
entered_dma# Radar Event Attribute Braze Event Property Type Example Value region.code
region_code
string "26"
region.name
region_name
string "Baltimore"
confidence
confidence
string "high"
foreground
foreground
boolean true
exited_dma# Radar Event Attribute Braze Event Property Type Example Value region.code
region_code
string "26"
region.name
region_name
string "Baltimore"
confidence
confidence
string "high"
foreground
foreground
boolean true
started_trip# Radar Event Attribute Braze Event Property Type Example Value trip.externalId
trip_external_id
string "299"
trip.metadata[{key}]
trip_metadata_{key}
{type} {value}
trip.destinationGeofenceTag
trip_destination_geofence_tag
string "store"
trip.destinationGeofenceExternalId
trip_destination_geofence_external_id
string "123"
foreground
foreground
boolean true
updated_trip# Radar Event Attribute Braze Event Property Type Example Value trip.externalId
trip_external_id
string "299"
trip.metadata[{key}]
trip_metadata_{key}
{type} {value}
trip.destinationGeofenceTag
trip_destination_geofence_tag
string "store"
trip.destinationGeofenceExternalId
trip_destination_geofence_external_id
string "123"
foreground
foreground
boolean true
approaching_trip_destination# Radar Event Attribute Braze Event Property Type Example Value trip.externalId
trip_external_id
string "299"
trip.metadata[{key}]
trip_metadata_{key}
{type} {value}
trip.destinationGeofenceTag
trip_destination_geofence_tag
string "store"
trip.destinationGeofenceExternalId
trip_destination_geofence_external_id
string "123"
foreground
foreground
boolean true
arrived_at_trip_destination# Radar Event Attribute Braze Event Property Type Example Value trip.externalId
trip_external_id
string "299"
trip.metadata[{key}]
trip_metadata_{key}
{type} {value}
trip.destinationGeofenceTag
trip_destination_geofence_tag
string "store"
trip.destinationGeofenceExternalId
trip_destination_geofence_external_id
string "123"
foreground
foreground
boolean true
stopped_trip# Radar Event Attribute Braze Event Property Type Example Value trip.externalId
trip_external_id
string "299"
trip.metadata[{key}]
trip_metadata_{key}
{type} {value}
trip.destinationGeofenceTag
trip_destination_geofence_tag
string "store"
trip.destinationGeofenceExternalId
trip_destination_geofence_external_id
string "123"
foreground
foreground
boolean true
entered_beacon# Radar Event Attribute Braze Event Property Type Example Value beacon._id
beacon_id
string "5b2c0906f5874b001aecfd8f"
beacon.description
radar_beacon_description
string "Store #123 - Drive-Thru"
beacon.tag
radar_beacon_tag
string "drive-thru"
beacon.externalId
radar_beacon_external_id
string "123"
beacon.metadata[{key}]
radar_beacon_metadata{key}
{type} {value}
confidence
confidence
string "high"
foreground
foreground
boolean true
exited_beacon# Radar Event Attribute Braze Event Property Type Example Value beacon._id
beacon_id
string "5b2c0906f5874b001aecfd8f"
beacon.description
radar_beacon_description
string "Store #123 - Drive-Thru"
beacon.tag
radar_beacon_tag
string "drive-thru"
beacon.externalId
radar_beacon_external_id
string "123"
beacon.metadata[{key}]
radar_beacon_metadata{key}
{type} {value}
confidence
confidence
string "high"
duration
radar_duration
number (minutes) 1.42
foreground
foreground
boolean true