• Recipes
  • Analytics
  • Supercharge your analytics with real world context from Radar

Supercharge your analytics with real world context from Radar

Analytics Marketing Sales Intermediate

Made by Radar

In this recipe, you'll learn how to use location data to understand where your customers are when they engage with you.
What do you need?
  • A website
  • A Segment Workspace
  • A Radar Account
Increase conversion with personalized lifecycle campaigns
Collect data once with Segment and send it any tool you use. No more tedious integrations. No more engineering resources wasted.
Start with Segment

Using Segment Destination Functions and Radar location enrichment, it is easy to build a solution that enables location data insights and activation.

Before building location based features to improve the customer experience and increase engagement, it is important to develop an understanding of which real-world locations are important customer touchpoints. 

It is critical to be able to answer questions like the examples below in order to effectively prioritize location based features:

  • Where are customers in the real world when they are searching for products on my mobile site? 

    • Are they searching while at competitor locations? 

    • Are they in our stores? 

    • Do certain locations generate more search requests than others? 

  • Where are customers when they first install our app? 

    • Are my in-store download incentives and signage leading to conversions? 

    • Are specific stores driving significantly more downloads than others?

  • How far are customers from my nearest store when they order delivery vs pickup?

Radar and Segment can be used to efficiently answer these types of questions and in turn influence location feature prioritization to maximize the customer impact.

In this example, we will analyze the physical locations from where customers search on our website. We will represent the American superstore Walmart and we are interested in seeing if we should prioritize specific offers when potential customers are on our website at competitors.

Step 1: Enrich Segment Events with location

The first step is to enrich existing Segment Track calls with location data following the common fields spec

As you can see in the code snippet below, Radar has a sample function that tracks mobile web searches in Segment and leverages built-in browser capabilities to get the current device position and add it as event context.

Radar11

Step 2: Set up Radar

The next step is to set up Radar to enrich the location context that will be fed via Segment. You can configure both custom geofences specific to your business as well as tap into the Radar places database for out-of-the-box geofences.

Enabling places:

radar1

Adding Geofences:

radar2

Step 3: Setup Segment Destination Function

Now that Radar is set up with the right context and your digital properties are sending through location data to Segment, you can forward that Segment data onto Radar for enrichment and analytics. 

In this case we will use a Segment Destinations Function to enrich Segment track events by forwarding them to Radar’s track API. When creating the function, you can add a setting for the Radar publishable key, which will be accessed via the Radar dashboard.

radar3

Adding the Radar Publishable Key:

radar4

(Note: The associated code for this step can be found in this gist on GitHub)

Once the function is set up, you can establish the connection from the relevant sources feeding in events with location data to the Radar Enrichment destination function.

radar5

When events are fed through Segment, they will show up both in Segment’s debugger and Radar Locations and Events streams.

Debugger:

radar6

Locations:

radar7

Events:

radar8

Step 4: Analyze Data

Now that we have event data in Radar, we can analyze real world engagement patterns to drive location feature prioritization. Radar will be generating events which can be filtered and pivoted to drive location contextualized insights and decisions around feature development.

In the competitive analysis example below, it appears many customers are searching for our products at Walgreens and CVS. This allows us to decide on how best to engage them to drive sales away from the competition via in-app offers or free delivery when customers are at these locations.

Radar Analytics Filtering:

radar9

Example competitive analysis:

radar10

Step 5: Wrapping up

Here’s what we’ve done in this recipe:

  • Setup Segment tracking to send location data with relevant events

  • Enabled Radar to enrich location data with context relevant to my business

  • Configured Segment to feed Radar location data for enrichment via a Segment Destinations function

  • Analyzed data in Radar to develop insights and decide on location features to prioritize to drive engagement