Note: Adtriba Core is a legacy feature that we continue to support but no longer sell. The latest version of this feature is available as Funnel Measurement.
If you are already using Funnel Measurement, find more information here. To upgrade, contact us.
Use this guide to integrate Adtriba tracking on single-page applications (SPAs) without creating false touchpoints.
What is a single-page application?
A single-page application (SPA) runs in a browser and does not reload the page during use. Examples include Google, Gmail, Maps, Facebook, Twitter, and GitHub.
SPAs work well for responsive websites on mobile devices, tablets, and desktop browsers. SPAs can improve performance, so they are increasingly common.
Why are SPAs a problem for Adtriba?
Adtriba uses the page referrer to distinguish traffic. When the referrer changes during a visit, Adtriba records a new touchpoint in the customer journey.
If a user clicks a Google Search link to reach yourwebsite.com, the referrer is google.com. Adtriba records the visit as SEO traffic.
On most basic SPA setups, the referrer is not persistent. On the second pageview, the referrer is empty. Adtriba detects the referrer change and records a direct touchpoint, even though the user did not arrive via direct traffic.
How to solve the problem
Option 1
This is the preferred option. It solves the problem in most cases and is easy to implement.
Fire the main pageview tag only on the entry page and on the conversion confirmation page. This prevents referrer changes while the user browses the site.
Option 2
On SPAs, the referrer can become empty or change to a self-referral. Tools with a session concept may not have this issue. Adtriba counts all new entries regardless of sessions, so empty referrers cause incorrect touchpoints.
Ask your IT team to ensure the referrer is not empty after the user leaves the landing page. Set the referrer to your website domain. Use the pageview snippet extension below to overwrite the referrer with the domain value.
<script type="text/javascript">
(function()\{
window.adtriba = window.adtriba || [];
window.adtriba.push(["pageview", "", \{
location: "https://example.com/new-location",
referrer: "https://my-new-referrer.com"
\}]);
\})();
</script>