About Looker
Looker, a business intelligence and big-data analytics platform, enables you to explore, analyze, and share real-time business analytics seamlessly.
Looker and Braze empower you to transform customer experiences with live customer-lifecycle data visualizations.
Integration
Braze partners with Looker through first-party Looker Blocks and flagging users within Braze via REST API. 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.
Braze’s Looker Blocks can reduce the burden of modeling data and enable marketers to quickly access and visualize data.
Available 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.
Braze currently has two Blocks available: the Message Engagement Analytics and the User Behavior Analytics Blocks.
Block | Description | More Information | Code |
---|---|---|---|
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 from Looker. | See the code on Github. |
User Behavior Analytics Block | This block includes data around custom events, purchases, sessions, location events, and uninstalls. | Learn more about this Looker Block from Looker. | See the code on Github. |
Implementing the Looker Blocks
To implement the Looker Blocks, follow the instructions in the README files of the Github code.
Braze has built our Looker Blocks using Snowflake as our data warehouse. While we aim for our Blocks to work with as many data warehouses as possible, there may be some SQL functions that differ in availability, syntax, or behavior across dialects.
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.
Be aware of different naming conventions! Custom names can cause incongruences in data unless you take care to change all corresponding names. If you’ve customized any View/table or model names, rename each in the LookML to the name you’ve selected.
Flagging Users within Braze
Looker Actions allows you to flag users within Braze via the REST API Endpoint from a Looker Look. Actions requires that a dimension is tagged with braze_id
. The Action will append the flagged value to the users looker_export
custom attribute.
Only existing users will be flagged. You cannot use pivoted Looks when flagging data in Braze.
Update User Attributes
Optional, any attributes can also be set by using a tag of braze[]
with the name of the attribute between the []
ie if you want a custom attribute of User Segment
to be sent, then the tag would be braze[User Segment]
.
- Note the following:
- Attribute will only be sent if it’s included as a field within the look.
- Attribute name are case sensitive.
- Supported types are:
Strings
,Booleans
,Numbers
andDates
. - Standard attributes can also be set as long as they matched the standard user profiles name exactly.
- The full tag will be within quotes, so it should look like
tags: ["braze[first_name]"]
. Other tags can also be assigned but will be ignored. - Additional information can be found on Github
Setup Instructions
You can also find these instructions and sample code on Github.
Step 1: Create a REST API Key
Create a REST API Key with access to user.track
from the Braze Developer Console.
Step 2: Set Up a Braze Looker Action
Setup the Braze Looker Action with the API Key, and Braze REST Endpoint.
Step 3: 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 4: Send the Looker Action
- Within a Look with a
braze_id
dimension selected, click the Settings gear ( ) on the upper right, and selectSend...
. - Select the custom Braze Action.
- From the drop down, select the appropriate
Unique User Key
for the Braze account (external_id
orbraze_id
). - Give the export a name. If none is provided,
LOOKER_EXPORT
will be used. - Under Advanced Options, select
Results in Table
orAll Results
- Click
Send
.
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.
Segment Users by Looker Export
To target the flagged users, a Braze Segments can be created that matches the flagged value.
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.
Sample Outgoing API
Sample of the Outgoing API which will be sent to the /user/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"] }
},
.....
]
}