One of the most common causes of data discrepancies between Heap and other tools is when Heap is installed via a tag manager, like Google Tag Manager, or when it is installed directly in the
body of your pages.
When Heap is installed in the
body, it has to wait for the entire page and its contents to load before Heap even begins to load. This process often takes multiple seconds, and during that time, the user who loaded the page may have already clicked through one of your links, or clicked the back button in their browser.
For the most accurate data collection, make sure to install Heap directly in the
head element of your pages.
If the issue you’re encountering isn’t covered here, please reach out to firstname.lastname@example.org.
It’s not uncommon for Google Analytics to report a much higher session count than Heap, despite the definition of a session being very similar between both tools.
A session in Heap is defined as a period of activity from a single user on your website, and ends after 30 minutes of pageview inactivity. The same definition applies for Google Analytics, though they will count additional sessions for clicks on AdWords campaigns, and sessions that span across midnight.
Bots & Scrapers
Google Analytics, by default, will not filter any traffic, including low quality traffic like scrapers and bots. Heap automatically filters many different scrapers and bots.
You can block some bots in Google Analytics by going to Admin > View Settings, and checking Exclude all hits from known bots and spiders.
This won’t exclude bot data that’s already been collected, and since Google doesn’t necessarily block the same bots and scrapers that Heap blocks, there is a chance that the session counts will still differ.
In addition to the 30-minute inactivity rule for sessions, clicking on any Google AdWords link that leads to your pages generate a new session, even if the visitor had a pre-existing session.
For example, clicking through an AdWords link, then clicking back, and clicking the same AdWords link again will create two sessions. This doesn’t usually create a large disparity between Heap and Google Analytics, but if a large fraction of your traffic lands on your site via AdWords, it may become noticeable.
You may want to take extra steps to ensure AdWords tagging will be visible in Heap. See Marketing: Adwords: Manual & Auto-Tagging Best Practices for information on how to set this up.
Google Analytics Properties
If you’re looking at the session counts in Google Analytics, it’s important to make sure that you’re looking at All Web Site Data. If you’ve got Google Analytics installed on multiple parts of your site, and you’re using multiple Properties within Google Analytics, looking at just one of them may be excluding session data from different parts of your site.
It’s important to make sure that you’ve got Heap and Google Analytics installed on all the same places before attempting to compare data between them. If you have a blog, marketing pages, and a web application, and Heap and Google Analytics are not on all the same parts, reported numbers are very unlikely to match up.
If you’ve built a funnel in Heap and you’re comparing the results to a Conversion Goal in Google Analytics, you’ll find that they often differ significantly.
Heap’s funnels count the number of unique users who complete each step of the funnel in the time range selected, which is the past week, by default.
Goal Conversions in Google Analytics count the number of sessions in which the goal steps were completed. These steps must be completed in the same session, and a single unique user could complete these goal steps multiple times.
There is not a good way to match up Heap’s funnel conversion rates to Google’s Goal Conversions.
There is no report in Heap that will give the same results as the unique pageviews report in Google Analytics.
In Google’s own words: Unique Pageviews is the number of sessions during which the specified page was viewed at least once. A unique pageview is counted for each page URL + page Title combination.
There are two reasons why this report doesn’t map to a report in Heap. First, it’s measuring the count of sessions, not pageviews, and second, a pageview in Google Analytics is a URL + Title combination. In Heap, a pageview is a page load, or for single-page applications, a pushState event that changes the URL.
If your Google Analytics reports are sampled, even for a report as simple as total sessions, these reports will likely not match your Heap data. In general, the shape of the curve is usually pretty close, but the final counts will be off by a percentage that scales with the extent of the sampling being done. The discrepancy will grow for any report that drills deeper into the data, such as funnels and filtered reports.
New Users in Heap is a built-in segment. When graphed, it shows the count of users that first had a Heap cookie set on a particular day. Unless you installed Google Analytics on the same day as Heap, these counts will rarely map directly to a report in Google Analytics. The default new vs. return users report in Google Analytics also only shows the percentage of sessions, not the number of unique users.
To learn how to map new vs. returning users in Heap, see How do I analyze my new vs. returning users?
Single Page Applications
Heap will record a higher count of pageviews than Google Analytics in single page applications. This is because Heap captures URL changes and/or pushState changes as new pageviews, and Google Analytics does not. For more details, see Google Analytics developer documentation on
Single Page Application Tracking.
When comparing a retention report in Mixpanel to one in Heap, the values are likely to be very different, with the Mixpanel report typically inflating both the total number of users in a cohort, as well as the retention percentages.
Their documentation on this states the following:
A customer can only be counted once per bucket, but can be included in more than one bucket. For example, if you are bucketing based on your “item purchased” event and creating weekly buckets, a customer who purchased at least one item each week will be in every bucket, not just the bucket for their first purchase.
In Heap, a user is never included in more than one cohort. Since Mixpanel buckets a single user into multiple cohorts, this means that user counts in each cohort may be inflated, and the retention percentage for each cohort can also be inflated.
Form Submissions vs Internal Databases
Heap captures clicks, form changes, and form submissions automatically. This means that we hook into the events and try to preempt any other events as we capture data. If your form, like most forms, has form validation, then Heap will still capture a form submit event even if your own form validation signals that the form is incomplete.
If you want to compare internal data to Heap data for form submissions, there are a few recommended approaches.
The best approach which requires the least amount of effort is to look at the post-submit URL. For most shopping cart purchases, the user lands on a confirmation or thank you page. For signups or logins, they land on a profile or signup page. If your application has this flow, then using those pages as the event of comparison will likely produce better results.
To ensure that successful form submissions are tracked only when the form is completed, you can hook Heap’s custom tracking API directly into your existing form validation code.
If you’ve noticed that a Referrer or Initial Referrer in Heap displays your own domain, you’ve run into a self referral. For details on why this may appear, see Why do I see referrals from my own domain in Heap?
If none of the above apply to you, please reach out to email@example.com.