Please note that this recipe merely provides suggestions and examples for the use of Segment. It should not be taken or used as either clinical or legal advice, whether about patient care or the security and protection of PHI.
You should consult your legal, security and/or clinical experts as needed before implementing solutions for any new use cases.
Step 1: Connect your website to Segment
Create a Source in Segment to collect data as your patients use your website.
Install the Segment snippet on your website. Copy and paste the snippet from the overview page into the <head> tag of your site. Note: Sunshine Health is a fictitious name and bears no relevance to any customer or company.
Implement event tracking. Define the events and properties you want to trigger when a patient takes an action. For example, in this recipe, an event can be “Provider Search” with “Speciality” and “Location” as properties. Depending on your use case, you could potentially capture several events such as:
Provider Rescheduled (for appointments rescheduled by provider)
Patient Rescheduled (for appointments rescheduled by patients)
Patient No Show
Note: If you are using any 3rd party solution for appointment management or payment collection, you can have them publish data or events to your app (via webhooks or APIs) or to your data warehouse. From there you can push your data to Segment.
Step 2: Connect your data warehouse to Segment
The next step is to connect your data warehouse to Segment. Segment will automatically schematize the data landing in your data warehouse, allowing you to easily marry your online and offline data and uncover insights faster. This will allow Segment to categorize, schematize, and connect the different types of data in your warehouse so you can get to your insights faster.
Check out our step by step instructions on how to set up a supported data warehouse.
Step 3: Setting up Twilio Source
Now let’s say after browsing through the website, the patient picks up the phone and calls the office number (the Twilio number associated with the seller) on the doctor’s profile screen.
With Twilio’s call tracking feature, you can attribute calls with precision, and connect Twilio call logs with your website data via Segment.
Add Twilio as a Source in your Segment workspace.
After clicking Connect, you’ll be prompted for your Twilio Account SID. You can find it on your Twilio account under the project settings.
Click on Authenticate. You’ll be redirected to Twilio’s app and you’ll need to authorize Segment to read from your account data. To authorize, click the Allow button. 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 your online and offline data sources in your data warehouse to build a unified patient behavior profile.
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 2 and click “Finish.”
Now we’re ready to 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.
This will connect all your offline and online data in your warehouse.
You can view the status of the sync for each selected Source:
Click on Connections from the left navigation bar
Select your Source
Select the warehouse destination, under the Destination section
Step 5: Building audience or journey for your patients
Once you have all your offline (data from manual interaction) and online (data from app or website interactions) merged into Segment, you can use this to craft an audience or journey for your patients.
For example, if you have patients who have visited your website, performed a search for a provider, and viewed more than 2 physician profiles (but did not schedule an appointment), you can send them a message after 24 hours reminding them to book an appointment with one of the doctors they reviewed or make recommendations for other doctors who meet their specialization needs and are geographically close to the patient. For senior patients you could even use Twilio Voice tools to make an outbound call to assist in scheduling an appointment.
As a recap, here’s what we’ve done in this recipe:
Connected your online (app or website) data source to Segment.
Connected your offline (Twilio or data warehouse) data events to your online events.
Synced both datasets back to our data warehouse for analysis.
Want to start combining offline and online data for your own business? Get in touch with a member of the team or start building today.