Embedded Analytics with Tableau and Cube
Tags: embeddedanalytics, headlessbi, tableau, dataanalytics
Published: 2022-09-22 19:52:56

These days, customer-facing analytics are everywhere. 

We are, after all, in The Data Age—hence why you’re reading this blog and why we’re writing it. And because of the ubiquity of data, as consumers, we’ve become extraordinarily curious; we want to know everything about our businesses, investments, and lap times. 

Consumers are pining for insights—presented in fast-loading, beautifully customized dashboards. And so, many companies are turning to embedded analytics with [Tableau](https://www.tableau.com/). 

But as more consumers demand analytics, raising the standards of UI customization, interactivity, and speed, what if there were a more tailored, more performant way to give users the insights they need?

Well, there is: embedded analytics with Tableau and [Cube](https://cube.dev/). Let’s explain. 

## What is Embedded Analytics?

Simply put, [embedded analytics](https://cube.dev/blog/what-is-embedded-analytics) is the practice of integrating data analytics and visualization capabilities with a user’s natural workflow, such as their web portals, internal tools, or applications. 

For example: with embedded analytics, rather than needing to export sales data from their e-commerce platform and then conduct analysis separately in Excel, a seller could derive insights from dashboards and reports available to them directly within their commerce portal. 

Of course, embedded analytics __can be used in internal- and external-facing applications to provide real-time static and interactive reports, dashboards, and data visualizations__. 

There are many benefits of using embedded analytics. First, it can __save the user time and effort__ and add a lot of value. In turn, this saved time and gleaned insights __contribute to a user-centric UX that drives adoption__—even among those who aren’t as analytics-experienced. And higher adoption means a __better ROI on internal tooling__ and an __increase in revenue for external tooling__. 

## Embedded Analytics with Tableau

![embedded analytics with tableau schema](https://ucarecdn.com/1b6df403-1884-4e4d-83b1-b26788833ef4/)

So, why do so many companies turn to [embedded analytics with Tableau](https://www.tableau.com/products/embedded-analytics)?

Tableau is one of the leading platforms for data visualization and dashboarding. It's based on its own VizQL, which expresses data visually by translating drag-and-drop actions into data queries. 

This drag-and-drop capability makes data analytics and business intelligence accessible to a much wider pool of people—which is a great thing. Clearly, given its smashing success, Tableau met a hot demand for data democratization and did it well. 

*However*, things get a little more hinky when it comes to the [embedded analytics stack](https://cube.dev/blog/modern-embedded-analytics). This is because users not only use Tableau for analytics within Tableau itself but also use it to power embedded analytics within other applications. 

The problem is that __having your embedded analytics with Tableau sit directly on top of your data warehouse comes with a few shortcomings__, such as:

1. Difficulty with customizability and designing user-centric UIs

2. Duplicated effort and opportunities for inconsistency when creating multiple sets of data definitions and security contexts

3. Weaker analytics performance

### 1) Difficulty with customizability and designing user-centric UIs
Tableau has many visualization layer options, but it just doesn’t have one for every audience or use case. You can undoubtedly brand the Tableau visualizations embedded in your app; however, there are restrictions on what you can build with the visualization layers Tableau offers (e.g., extremely use-case-specific drill-downs).

And so, __Tableau’s visualization templates may work just fine for 80% of your applications, but those that truly need a highly tailored, custom UI will require you to build a custom presentation layer from scratch__. 

The problem is that using multiple different visualization layers together with Tableau—meaning, both custom-built and from Tableau—leads to…

### 2) Duplicated effort and opportunities for inconsistency

![embedded analytics with tableau problems](https://ucarecdn.com/78d63d2b-23b9-48f4-bb96-8bab43cc7ded/)

So you want to use Tableau and a separate charting library to build a custom presentation layer? That makes perfect sense when you want to combine the advantages of Tableau’s presentation layers with the flexibility of a custom UI. 

However, the challenge lies in consistently orchestrating data modeling, security, and caching across all of your presentation layers. 

__By connecting multiple presentation layers to your data warehouse, you’ll need to individually orchestrate your data models and access controls so they’re uniformly defined__. That’s a lot of duplicated effort—which opens the door to gaps and errors. 

### 3) Weaker analytics performance

Lastly, powering embedded analytics with Tableau without a BI layer between Tableau and the data warehouse can cause latency in your user-facing visualizations and dashboards.

Latency is a true user adoption killer: a Google study showed that [bounce likelihood increased by 32%](https://www.thinkwithgoogle.com/marketing-strategies/app-and-mobile/mobile-page-speed-new-industry-benchmarks/) when a page’s load time increased from one second to three, and by *90%* when page load time increased from one to five seconds. So, performance is essential.

__In a stack in which Tableau’s presentation layer sits directly on top of your data source, your users request data from the data source for every query__. At best, __this is redundant and costly__, as multiple users may be requesting the same information. 

At worst, however, building a stack like this __can result in latency and lower performance__. Request volume across users is unpredictable; you can’t control how many people simultaneously request data or consume visualizations. And so, if you have multiple presentation layers, each with duplicate data modeling, security, and caching layers, each making separate and redundant requests directly of the data source—that opens the door to latency.

Latency can be a problem even if you only use Tableau (don’t worry, we happen to have [a fix](https://cube.dev/cloud)). But, with multiple presentation layers, the chance of uneven performance across them is much higher. 

## The best of both worlds: embedded analytics with Tableau and Cube

Alright—let’s get to the solution. 

Tableau is a fantastic tool (in fact, here’s [how to use Tableau with Cube](https://cube.dev/blog/tableau-tutorial).) Combining it with custom presentation layers is a great way to get both efficient, out-of-the-box visualizations and user-centric UI for your embedded analytics. 

So how can you fix the issues above? With upstream, centralized data modeling, security, and caching orchestration. Hi, we’re [Cube](https://cube.dev/cloud). 

### Cube streamlines building embedded analytics with Tableau and custom presentation layers

![embedded analytics with tableau and cube](https://ucarecdn.com/b52d016a-8ca8-4cdb-85aa-765669ff781c/)

Cube is a [headless BI](https://cube.dev/blog/headless-bi) platform that enables your data modeling, data access control, and caching layers to live upstream of every presentation layer and data application in your stack. 

So, rather than individually orchestrating r[ole-based access controls](https://cube.dev/docs/recipes/role-based-access#enforcing-role-based-access) or metrics definitions for each presentation layer, you’re centralizing and defining them once—removing duplicated effort and its inevitable inconsistencies.

### Cube ensures uniformly performant embedded analytics powered by Tableau and custom presentation layers

Cube’s robust caching layer manages the throughput of data requests and acts as a buffer between your data source and your data application. Its advanced [pre-aggregation capabilities](https://cube.dev/docs/caching#pre-aggregations), query queue, and [refresh keys](https://cube.dev/docs/caching#in-memory-cache-refresh-keys) protect your data warehouse from redundant, costly, and latency-causing queries. 

Designed to protect the data source from the possibility of even an unlimited number of concurrent requests, Cube can significantly speed up your embedded Tableau dashboards and visualizations. 

Cube also makes embedded analytics more performant even when built with a combination of Tableau and custom presentation layers. By allowing Cube to do the heavy lifting of data modeling, security, and caching orchestration, the presentation layers become very “thin”—essentially, not needing to process much. This enables them to become uniformly performant and allows the application’s embedded analytics to become more performant as a whole. 

## Learn More

Interest piqued? We thought it might be. 

Give your users a performant, data-rich embedded analytics experience with Tableau and Cube—especially since [Cube is free to use](https://cube.dev/cloud) and we already have a [tutorial for using Tableau with Cube](https://cube.dev/blog/tableau-tutorial).

Get in touch with us and the rest of the Cube community on [Slack](https://slack.cube.dev/) or [Github](https://github.com/cube-js/cube.js).

In the mood for some hands-on help with building a modern embedded analytics data stack? [Schedule a time to chat with us 1:1](https://cube.dev/contact).