Two powerful tools, together

Integrate Heap and Microstrategy to turn your data into actionable insights.

About Heap

Heap builds analytics infrastructure for online businesses.


Stitch offers detailed documentation on how to sync all your Heap data today.

Stitch Heap Documentation

About Microstrategy

MicroStrategy supports more than 70 data sources for creating drag-and-drop data analytics dashboards and visualizations.

Learn more about Microstrategy

Stitch makes it easy to get data into Microstrategy.

Follow these three steps:

Data flowing out of Heap

Connect Heap to Stitch

Quickly connect your Heap account to Stitch, choose your data, and replicate on a schedule you define.

Data flowing through Stitch logo

Send your data to the leading warehouses

Stitch delivers your data to the analytics warehouse of your choice. Don't have a warehouse yet? No problem. Stitch can provision one for you.

Data flowing into an analytics warehouse

Connect your warehouse to Microstrategy

In most cases, it's simply a matter of providing access credentials. Stitch helps you focus on analysis, not data consolidation.

Data flowing into Microstrategy

Jumpstart your Heap analytics with reusable blocks

dbt packages can speed up your work

Once you replicate your Heap data with Stitch, you can use it in many ways. For example, you can use the data modeling and transformation tool dbt to prepare data for reporting, analytics, or machine learning applications.

Dbt has prebuilt packages for many Stitch data sources, including Heap. Here’s a look at code for modeling Heap data. This particular block of code sessionizes your Heap data.

View the source on GitHub →
                          
                            {% macro heap_sessions() %}
    {{ adapter_macro('heap.heap_sessions') }}
{% endmacro %}
{% macro default__heap_sessions() %}
{% set window_clause =
    "over
        (partition by session_id
        order by session_start_time
        rows between unbounded preceding and unbounded following
    )"
%}
{% set last_value_columns = [
    'user_id',
    'session_start_time',
    'library',
    'platform',
    'device',
    'device_type',
    'carrier',
    'app_name',
    'app_version',
    'country',
    'region',
    'city',
    'ip',
    'referrer',
    'landing_page',
    'browser',
    'search_keyword',
    'utm_source',
    'utm_campaign',
    'utm_medium',
    'utm_term',
    'utm_content'
]%}
with base as (
    select * from {{var('sessions_table')}}
),
cleaned as (
    select
        user_id,
        session_id,
        {{heap.time_field('session_start_time')}},
        library,
        platform,
        device,
        device_type,
        carrier,
        app_name,
        app_version,
        country,
        region,
        city,
        ip,
        referrer,
        rtrim(landing_page, '/') as landing_page,
        browser,
        search_keyword,
        nullif(utm_source, '') as utm_source,
        nullif(utm_campaign, '') as utm_campaign,
        nullif(utm_medium, '') as utm_medium,
        nullif(utm_term, '') as utm_term,
        nullif(utm_content, '') as utm_content
    from base
),
deduped as (
    --this sucks to have to do but heap frequently sends duplicate session data
    --and it forces us to have to deduplicate based on session_id in modeling
    select distinct
        session_id,
        {% for column in last_value_columns %}
            last_value({{ column }}) {{window_clause}}
                as {{ column }}
            {% if not loop.last%} , {% endif %}
        {% endfor %}
    from cleaned
)
select * from deduped
{% endmacro %}
                          
                        

Heap to your data warehouse in minutes

Stitch delivers all your data to the leading data lakes, warehouses, and storage platforms.

Stitch saves us a ton of time. Having a standard process to put the data in the warehouse and then feeding that data to a dashboard gives us more time to dig and uncover the story the data is telling us.

Kristen Allcorn

Data Analyst, NextAfter

Why our customers choose Stitch

Stitch is a simple, powerful ETL service built for developers. Stitch connects to your first-party data sources – from databases like MongoDB and MySQL, to SaaS tools like Salesforce and Zendesk – and replicates that data to your warehouse. With Stitch, developers can provision data for their internal users in minutes, not weeks.

Explore all of Stitch's features
Simple setup
Start replicating data in minutes, and never worry about ETL maintenance.
Own your own data infrastructure
Stitch replicates to your warehouse, meaning you’re always in control.
Mature replication engine
Accurate data from any structure, all the time.
Explore all of Stitch's features

Connect to your ecosystem of data sources

Stitch integrates with leading databases and SaaS products. No API maintenance, ever, while you maintain full control over replication behavior.