Looker Blog : Data Matters

Segment Sources & Looker Blocks

Erin Franz, Alliances

Apr 6, 2016

Looker is proud to be a launch partner for Sources, Segment’s new offering for pulling data from channels important to your business. From CRM data, to help desk tickets, payments and more, Segment can pull your crucial data sources into a warehouse in just a few clicks. Looker and Looker Blocks provide a helpful platform to explore your data and quickly realize insights.

Intro

Looker and Segment both believe in the importance of data centralization. In order to get a 360 degree view of the customer, you need to integrate many data sources- from transactional data to behavioral analytics. With Segment Warehouses, you can easily pass behavioral data collected from your website or app into a Redshift or Postgres warehouse. This product enables many integrations commonly used to track behavior on a website or application to be consolidated into a consumable and queryable interface, that can be combined with existing data to drive business insights. The Looker for Segment Block enables quick time to value for the Warehouses dataset that can be extended to provide customized metrics specific to your business.

Building on the key tenant of data centralization, Segment Sources now offers even more data for your warehouse. If you want to understand the complete picture of how customers interact with your company, you need to pull data from every touch point into one place. However, data from SaaS applications such as Salesforce, Stripe, Zendesk, and more are often siloed in their own reporting interfaces. By bringing these sources into a centralized data warehouse via Segment Sources, reporting can be on your own terms. Cloud service data can be analyzed on its own, joined to other sources, or even joined with behavioral or transactional data. Looker can provide a platform to surface metrics that matter on top of these datasets across an organization, giving everyone the ability to answer their own questions.

In this blog post, we’ll cover how you can use Looker to explore one of Segment’s Source connections (Salesforce) and then join it to Segment event data for behavioral analysis.

Looker for Segment Sources: Salesforce

To start analyzing data from you cloud services, just enter your credentials into Segment. They will automatically start syncing to your data warehouse in a ready-to-query format. Looker can directly connect to these data warehouses and enable data exploration via the LookML modeling layer. This modeling layer facilitates a single set of data definitions to be used across an organization that users can select and build their own reports from that are really just executing SQL to the backend data warehouse. Looker Source Blocks are available for a number of these sources, including Salesforce.

Implementing the Salesforce Block provides a starting point for a LookML data model. Salesforce data can be customized with a wide array of customizable objects. Looker's Salesforce Block generates a pattern based on those core objects that are standardized across instances, such as Accounts, Opportunities, and Leads.

For instance, if we wanted to start exploring our sales funnel, we could set up the following explore in LookML:

- explore: leads
  joins:
    - join: accounts
      sql_on: ${leads.converted_account_id} = ${accounts.id}
      relationship: many_to_one

    - join: opportunities
      sql_on: ${leads.converted_opportunity_id} = ${opportunities.id}
      relationship: many_to_one

By establishing relationships between tables in the underlying data warehouse, we can then define dimensions and measures that can create such aggregate analyses as a Lead to Win funnel.

Funnel

And additionally, because we still have access to the row level information, we can drill further into each of these aggregate values to learn more about them. For instance, we can see a list of the closed won opportunities, and additionally look for trends in successful deals. In this case, we can see that most of our revenue came from closed deals came from the West region.

Funnel Funnel

Looker for Segment Warehouses and Sources

Creating a data model on top of a single source like Salesforce can provide plenty of insights important to a business. However, additionally combining Sources data with event tracking analytics can further augment the view of the customer. As a starting example, finding the content viewed on your website most frequently by customers of closed deals could indicate what should be promoted to prospects. Using Looker on Segment, we can easily define an explore to join page view data tracked with Segment with Salesforce Sources data:

- explore: pages
  joins:
  - join: groups
    type: left_outer
    sql_on: ${pages.user_id} = ${groups.user_id}
    relationship: many_to_one

  - join: accounts
    type: left_outer
    sql_on: ${accounts.external_id} = ${groups.group_id}
    relationship: many_to_one

  - join: opportunities
    type: left_outer
    sql_on: ${accounts.id} = ${opportunities.account_id}
    relationship: one_to_many

Then we can explore the data to find which pages were viewed by closed won opportunities:

Funnel

Try Looker and Segment!

Refer to Looker’s Discourse site for more details on Looker Blocks, or you can access the Source Blocks by reaching out to your assigned Looker analyst or request a Looker demo and trial. To learn more and get started with Segment Sources and Warehouses, visit Segment and create an account today.

Next Previous

Subscribe for the Latest Posts