Languages used
- JavaScript / React Native
Features used
Steps
1
Sign up for Radar
If you haven’t already, sign up for Radar to get your API key.Get API keys
2
Enable Places
Navigate to the Settings page and enable Places. From there, configure the chain filters or category filters relevant to your use case.For example, to notify users when they arrive at a specific retail chain, add the chain slug (e.g., Alternatively, you can create custom geofences and trigger notifications when a user enters those boundaries instead. See the geofencing docs for setup instructions.
target, home-depot) to your chain filters. To notify users when they arrive at any location in a category, add the relevant category slug (e.g., department-store).View the full list of chains and full list of categories.Places is available on the Enterprise plan. Contact your account manager to enable it for your project.
3
Install the React Native SDK
For full setup instructions, see the React Native SDK docs. Once the SDK is installed, initialize it:
4
Identify the user
Set a stable user ID to link location events to the user in your system. Optionally, attach metadata to enable personalized experiences or campaign targeting.
5
Request location permissions
Before tracking, you must request location permissions from the user. Always request foreground permissions before background permissions.
Use a primer screen before triggering the OS permission prompt to explain the value the user will get from sharing their location. This significantly improves opt-in rates.
6
Start tracking
Once permissions are granted, start tracking the user’s location. For most consumer use cases, use the Radar will automatically evaluate the user’s location against your enabled Places chains and categories and generate
RESPONSIVE preset, which provides a good balance of location update frequency and battery usage.user.entered_place events when a user stops at a matching location.7
Create a campaign
Navigate to Settings tab, and enable push notifications.Then enter in the app’s bundle ID, team ID, key ID, and key for iOS. Enter the project ID, client email, and private key for Android. Then save the settings.Navigate to the Campaigns page in the Radar dashboard and click Create.Select Event based notification as the campaign type and configure the following:If you prefer to manage campaigns outside of Radar, you can use one of the Radar integrations to trigger notifications through your existing messaging platform.
- Trigger event:
Entered place - Place chains: Select the chains you want to target (e.g.,
target,home-depot) - Notification title and body: Write the message to deliver to the user on arrival
- Deep link (optional): Add a deep link URL to route users to a specific screen when they tap the notification
Event based notifications require background (
Always allow) location permissions to deliver. For foreground-only notification delivery, use the Client side geofence campaign type instead (iOS only).8
Listen for place events client-side (optional)
To handle Add event listeners outside of your component lifecycle to ensure they work when the app is in the background.The place event payload includes the following context:
user.entered_place events directly in your app, for example to trigger an in-app experience rather than a push notification, add an event listener:9
Log conversions (iOS only)
Logging conversions is required to measure the impact of your campaigns. When a user completes a key action after arriving at a place, such as completing a purchase, log a conversion event so Radar can attribute it to the campaign that triggered the notification.Enable automatic conversion logging in your You can also log conversions manually from JavaScript. Log a conversion when a user lands on a key screen after receiving a notification:Or log a conversion with revenue when a user completes a purchase:See the conversions docs for more details.
AppDelegate.mm to track when users open the app from a notification:10
Set up deep linking
Radar campaign notifications support deep linking into a specific screen in your app when a user taps a notification.iOS: This requires additional native setup in your
AppDelegate. See the deep linking docs for setup instructions.Android: Refer to the official Android documentation to configure deep links for your Android app. No additional Radar-specific setup is required.