Looker

Looker, a business intelligence and big-data analytics platform, enables you to explore, analyze, and share real-time business analytics seamlessly.

The Braze and Looker integration allows Braze users to leverage first-party Looker Blocks and Looker Actions user flagging via the REST API. Once flagged, these users can be added to segments to target future Braze campaigns or Canvases. To use Looker with Braze, we recommend sending your Braze data to a data warehouse using Braze currents, then use Braze’s Looker Blocks to quickly model and visualize your Braze data in Looker.

Prerequisites

Requirement Description
Looker account A Looker account is required to take advantage of this partnership.
Braze REST API key A Braze REST API key with users.track permissions.

This can be created within the Braze Dashboard -> Developer Console -> REST API Key -> Create New API Key
Braze REST endpoint Your REST endpoint URL. Your endpoint will depend on the Braze URL for your instance.

Limitations

  • This process only works with data that has not been pivoted.
  • Currently, the API is limited to 100,000 rows sent.
  • The final count of a user’s flag may be lower due to duplicates or non-users.

Integration

Looker Blocks

Our Looker Blocks help Braze customers quickly access a view of granular data we offer via Currents. Our blocks provide pre-made visualizations and modeling for Currents data so Braze customers can easily implement analytic patterns like retention, evaluate message deliverability, take a more detailed look at user behavior, and more.

To implement the Looker Blocks, follow the instructions in the README files of the Github code.

Both integrations assume that your initial Braze integration, as well as your Braze integration with a Looker-compatible data warehouse, is appropriately configured to capture and send necessary data.

Available Blocks

Block Description
Message engagement analytics block This block includes data around push, email, in-app messages, webhook, newsfeed, conversion, Canvas entry, and campaign control group enrollment events.

Learn more about this Looker Block, or check out the Github code.
User behavior analytics block This block includes data around custom events, purchases, sessions, location events, and uninstalls.

Learn more about this Looker Block, or check out the Github code.

Looker Actions

Looker Actions allow you to flag users within Braze via the REST API endpoint from a Looker Look. Actions require that a dimension is tagged with braze_id. The Action will append the flagged value to the user’slooker_export custom attribute.

Step 1: Set up a Braze Looker action

Set up a Braze Looker Action with your Braze REST API key and REST endpoint.

Braze Looker Action

Step 2: Set up Looker Develop

Within Looker Develop, select the appropriate views. Add braze_id to the dimensions tag.

1
2
3
4
5
6
dimension: external_id {
    type: string
    primary_key: yes
    sql: ${TABLE}.external_id ;;
    tags: ["braze_id"]
}

Step 3: Set user attributes in tags

Optionally, any attribute can be set using a braze[] tag with the attribute name in the brackets. For example, if you wanted a custom attribute user_segment to be sent, the tag would be braze[user_segment].

Note the following limitations:

  • Attributes will only be sent if it’s included as a field within the look.
  • Supported types are Strings, Boolean, Numbers, and Dates.
  • Attribute names are case-sensitive.
  • Default attributes can also be set as long as they match the standard user profile names exactly.
  • The full tag should be formatted within quotes. For example, tags: ["braze[first_name]"]. Other tags can also be assigned but will be ignored.
  • Additional information can be found on Github.

Step 4: Send the Looker action

  1. Within a Look with a braze_id dimension selected, click the settings gear ( ) on the upper right, and select Send….
  2. Select the custom Braze Action.
  3. Under Unique Key, provide the primary user mapping key for the Braze account (external_id or braze_id).
  4. Give the export a name. If none is provided, LOOKER_EXPORT will be used.
  5. Under Advanced Options, select Results in Table or All Results and then Send.

    Send Looker Action

    If the export was correctly sent, then LOOKER_EXPORT should appear in the user’s profile as a custom attribute with the value you entered in the action.

    Custom Attribute in Braze from Looker
Sample outgoing API

The following is a sample of an outgoing API call, which will be sent to the /users/track/ endpoint.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
{
   "api_key" : "[API_KEY]",
   "attributes" : [
      {
        "external_id" : "user_01",
        "_update_existing_only" : true,
        "looker_export" : { "add" : ["LOOKER"] }
      },
      {
        "external_id" : "user_02",
        "_update_existing_only" : true,
        "looker_export" : { "add" : ["LOOKER"] }
      },
      {
        "external_id" : "user_03",
        "_update_existing_only" : true,
        "looker_export" : { "add" : ["LOOKER"] }
      },
      .....
   ]
}

Segment users in Braze

In Braze, to create a segment of these flagged users, navigate to Segments under Engagement, name your segment, and select Looker_Export as the filter. Next, use the “includes value” option and provide the custom attribute flag you assigned in Looker.

Braze Segment by Looker Export

Once saved, you can reference this segment during Canvas or campaign creation in the targeting users step.

WAS THIS PAGE HELPFUL?
New Stuff!