Customer relationships used to be simple. Most interactions took place in a single channel, usually 1:1 with a salesperson, and the resulting data was easily managed in a CRM.
Today, a customer’s path to purchase is more complex than ever, often involving a variety of online and offline channels. Your next customer might click on an email, browse through your website, and then purchase in-store.
Customer relationships - then and now
Getting a complete picture of the role online and offline channels play in your customer engagement strategy has traditionally been difficult to achieve, due to the lack of robust infrastructure to connect those different data sources together.
Thankfully, a customer data platform solves this problem by being your one-stop-shop for customer data. The ability to centralize different data sources in one place gives you customer engagement superpowers – you can see all the activity of a user, from any channel, online or offline, in a single record.
Step 1: Connect your data warehouse to Segment
The first step is to connect your data warehouse, that central repository where the majority of your business data lives, to Segment.
This is so Segment can start the heavy lifting of categorizing, schematizing, and connecting the different types of data in your warehouse, so you can get to your insights faster.
Segment partners with all your favorites in the cloud data warehouse space - Snowflake, Redshift, Postgres, and more.
The warehouses available via the Segment catalog
Connect your Segment workspace to Snowflake
Step 2: Connect your website to Segment
The next step is to implement Segment on your website so you can track visitor’s website activity.
As a refresher Segment enables you to collect multiple behavioral and demographic data points from across your online properties - whether that’s websites, apps, ads and landing pages.
In this case, we want to track where the visitor came to realestate.com (e.g a Facebook ad), and what activity they performed (e.g completing a search, browsing specific listings, scheduling tours.
Create a Source to collect data on the realestate.com website. A Source is where actions taken by customers such as
Tour Scheduledare collected as “events” and sent to Segment.
Install the Segment snippet on your website. Copy and paste the snippet from the overview page into the
<head>tag of your site.
Implement events. Select the events you want to trigger when a visitor takes an action. You can define additional metadata to describe those events and send them as properties to Segment e.g. ‘property type: townhome’. Pro tip: use context properties to capture UTM parameters that resulted in the API call.
Property Inquiry Sentor
Agent Contacted(really any conversion event you’d like to track) can be tracked via Segment. This is so we can associate these online clickstream events to offline data that contributed to the conversion.
Step 3: Set up a Twilio Source
Now let’s say after browsing through the website, the visitor picks up the phone and calls the agent (the Twilio number associated with the seller) on the page listing.
How can we ensure that the activity that took place online is joined together with the activity offline?
With Twilio’s call tracking feature, you can attribute calls with precision, and connect Twilio call logs with your website data via Segment.
From the Sources page in your Segment workspace, click
Choose Twilio from the options provided.
Give the source a nickname and a schema name. The nickname is a label used in the Segment interface, and the schema name is the namespace you query against in your warehouse. Both can be whatever you like, but we recommend sticking to something that reflects the source itself, like
Twiliofor nickname and
twilio_prodfor the schema name. Note: You can add multiple instances if you have multiple Twilio accounts. That’s why we allow you to customize the source’s nickname and schema name!
Connect, and you’ll be prompted for your Twilio Account SID. You can find it on your Twilio account under the project settings.
You’ll be re-directed to Twilio’s app and you’ll need to authorize Segment to read from your account data. To authorize, click the
Allowbutton. Once approved, you’ll be redirected back to the setup page in the Segment app.
Step 4: Joining online conversion and offline call data in your data warehouse
Now it’s time to unify these different data sources in your data warehouse, so your team doesn’t have to go to five different places to understand customer behavior.
Once you’ve authorized your Twilio source, you will be directed to connect your Twilio source to your data warehouse. Complete this step by selecting the warehouse you configured in step 1.
Finishbutton. We’ll begin syncing your Twilio data into Segment momentarily, and it will be written to your warehouse at your next warehouse run.
You can sync all your data from Twilio, or if you want to keep your tables neat and tidy, leverage Segment’s selective sync feature. This ensures only the data you want finds its way into your database. For example, you could just send the call data collected from your Twilio source into your warehouse, and unselect messages/ addresses from the collections.
From your Segment workspace, connect and sync the website sources to your data warehouse (shown as
realestate.com_webin the diagram below).
That’s it! Your Twilio and Segment data are all connected in one place.
Website data (tracked via Segment) in Snowflake
Call data (tracked via Twilio) in Snowflake
Now you can start gaining some interesting insights into both datasets.
For example, realestate.com can now provide sellers with online data such as number of views and number of times an inquiry was requested, and glean insights to qualify higher intent leads e.g. a lead that calls in can be 10 times more valuable than one that submits a form or casually interacts with listings on its website.
Thus realestate.com can provide sellers with data to identify the buying behavior of buyers, so sellers can target listings that resonate with these buyers.
Protip: Since you already have your Segment data piped into your data warehouse, you only have to connect a BI tool like Looker to this Segment Database.
Using Looker and Looker Blocks you can quickly build a centralized data model in Looker with visualization and exploration capabilities, giving everyone across the organization – from marketing to sales – access to the data.
As a recap, here’s what we’ve done in this recipe:
Connected our data warehouse to Segment
Implemented event tracking to track conversion events on our website
Connected Twilio to Segment to attribute offline call events to online website conversions
Synced both datasets back to our data warehouse for analysis