Talivia
PricingDocsAI agents
English简体中文
Get started
← Back to blog

Talivia guide

Cross-Domain Tracking for SaaS Revenue Attribution

Learn how to preserve SaaS campaign, signup, and payment attribution across marketing sites, app domains, and hosted checkout without creating false sessions.

Talivia·2026-09-09

A SaaS customer journey rarely stays on one hostname. A visitor may discover www.example.com, start a trial on app.example.com, read account documentation on another property, and pay through a hosted checkout. If analytics assigns a new identity at every boundary, one buyer becomes several visitors. The acquisition report loses the campaign, the app appears to receive a self-referral, and the payment looks direct or attributed to the checkout provider.

Cross-domain tracking preserves a coherent journey when a person intentionally moves between domains that participate in the same funnel. It is not a license to follow people across unrelated websites, and it is not a substitute for payment confirmation. A robust SaaS setup must solve three separate problems: browser continuity, authenticated customer identity, and server-confirmed revenue.

This guide explains how to distinguish subdomain and cross-domain cases, design a narrow linker, validate the complete route, and connect the resulting session to paid outcomes without hiding uncertainty.

Map domain boundaries before changing tracking code

Begin with the real customer route, not a list of properties in an analytics console. Write down every origin a buyer can encounter from first landing to payment confirmation. Include the marketing site, product application, authentication service, documentation, scheduling tool, hosted checkout, billing portal, and final return page. For each transition, record whether it is a link, form submission, redirect, popup, embedded frame, or server-created URL.

Then classify every host into one of three groups:

  • The same registrable root, such as example.com and app.example.com.
  • A different root that your company owns and can instrument, such as example.com and example.app.
  • A third-party root that you cannot instrument, such as a payment provider or scheduling service.

The distinction controls the implementation. Cookies can be scoped to a parent domain and shared with its subdomains, but they cannot be set for an unrelated root. MDN's authoritative Set-Cookie reference documents that a cookie may apply to its issuing host or a parent domain that includes it. An example.com response cannot create a first-party cookie for example.app.

Do not add every external service to a cross-domain allowlist. A domain should participate only when it is part of the same measured journey, you have a lawful purpose for continuity, and the destination can validate the transferred identifier. Ordinary outbound links should remain ordinary outbound links.

Use cookie scope for subdomains, not a linker

A marketing site at example.com and an application at app.example.com are not a true cross-root case. Both sit under the same registrable domain. The simpler design is one website identifier and one first-party cookie scoped to example.com, with the same tracker configuration on participating hosts.

Talivia's subdomain tracking guide uses this model. Its generated Cloud snippet includes the root data-domain, allowing the anonymous visitor and rolling session to continue across the marketing site and application. A host-only cookie on www.example.com would not be sent to app.example.com, so copying an incomplete or manually altered snippet can still split the journey.

Keep security boundaries in mind. Sharing an analytics identifier across subdomains does not mean sharing login cookies, authorization state, or sensitive application storage. Those controls should remain narrowly scoped. Analytics needs a pseudonymous journey reference, not access to the account session.

Also distinguish cookie scope from collection scope. In Talivia, data-domain defines where the browser can send the first-party identity cookie. data-domains is an optional hostname allowlist for collection. It does not join identities. The tracker configuration reference explains these similarly named settings and should be checked before editing the generated snippet.

Pass a short-lived linker between unrelated roots

Different roots cannot read each other's first-party cookies. Continuity therefore needs an explicit handoff when the visitor follows an approved link or submits an approved form. The source creates a signed, short-lived token that represents the current anonymous visitor and session. The destination verifies it, resumes the journey under its own first-party storage, and removes the token from the visible URL before recording the page.

Talivia's cross-domain tracking documentation describes this flow. Teams add their owned roots in attribution settings and deploy the refreshed snippet to each one. Talivia then decorates matching transitions with _tlv. The token expires after five minutes, is restricted to one Talivia website ID, and is rejected if it is modified, expired, or presented to another website ID.

Those constraints matter. A permanent raw visitor ID in every link can leak through copied URLs, browser history, screenshots, server logs, and referrer headers. A signed token prevents silent modification; a short lifetime limits reuse; an allowlist prevents decoration of arbitrary destinations; and prompt URL cleanup reduces accidental persistence. The payload should never contain an email address, access token, payment credential, or other unnecessary personal information.

Google Analytics uses a comparable concept. Its official cross-domain measurement guidance explains that separate roots otherwise create separate first-party identifiers and that its _gl URL parameter carries identifiers between configured domains. The exact token format is product-specific, but the architectural principle is the same: transfer limited continuity evidence at an intentional boundary rather than pretending unrelated roots share a cookie jar.

Do not confuse hosted checkout with an owned domain

Hosted checkout creates the most common attribution mistake. A customer leaves the SaaS site, pays on a provider domain, and returns to a success page. The provider may not run your tracker, accept your linker, or expose a reliable browser event. Adding that provider to a referral-exclusion list can prevent a misleading source label, but it does not prove which earlier session paid.

Google's official guidance on unwanted referrals names third-party payment processors as a common exclusion case. This is a reporting cleanup, not identity stitching. It tells the analytics product not to treat the processor as a new acquisition source. It does not transport your original campaign through checkout or establish that money settled.

Use provider-supported correlation instead. If your backend creates checkout, attach a non-sensitive session or account reference in the supported metadata field. If the provider uses a standard payment link, use the return mechanism and integration behavior documented for that provider. Talivia's Stripe Checkout Sessions guide shows how a current Talivia session can be passed when a Checkout Session is created. Other providers have different objects and constraints, so do not copy a Stripe field name into every integration.

Most importantly, treat the provider's confirmed payment event as the financial fact. A success page can be closed, blocked, revisited, or opened before an asynchronous payment finishes. The revenue setup guide separates connecting a payment source from providing an attribution signal. Both are required for attributed revenue, and a failure in either should remain visible.

Connect anonymous continuity to a known customer carefully

A cross-domain linker answers, "Is this browser journey continuous?" It does not answer, "Which account owns this activity?" That second connection should happen only after the application has trustworthy identity context, usually after signup or login succeeds.

Use a stable internal customer ID rather than an email address as the primary analytics key. Email can change, differ between login and billing, or be typed by someone who never completes registration. Talivia's Distinct IDs guidance explains how the current anonymous visitor and session can be associated with an application identity and, when available, provider customer references.

Preserve the sequence. Acquisition context belongs to the anonymous landing session. The authenticated relationship begins when the product knows the account. Checkout metadata links a payment attempt to the relevant session or customer. The payment provider later confirms whether money was collected. Keeping these records separate lets an analyst inspect the join without rewriting old page views.

Do not force a match when the evidence is weak. A buyer can switch devices, block storage, share a team checkout link, or return after a linker expires. Record the payment as unattributed until a deterministic relationship exists. An explicit unknown is more useful than a campaign total built from guessed identity.

Validate the journey at every boundary

A successful page view on each domain is not enough. Testing must prove that continuity, source context, and payment matching survive the exact production route. Build a small matrix around the transitions customers actually use.

Start with a fresh browser profile and a uniquely named test campaign. Land on the marketing page with complete UTM parameters. Inspect the session and record its identifier. Move into the application using the real link or form, not a URL pasted directly into the address bar. Confirm that a cross-root transition receives a linker, that the destination removes it after validation, and that the same journey retains the original source.

Repeat the test for common variations: direct navigation to the app, a link opened in a new tab, an expired token, a modified token, a domain not on the allowlist, a redirect that drops query parameters, and a browser that rejects nonessential storage. Expected rejection is part of the test. An invalid token should create an honest new journey, not be accepted because the report looks cleaner.

Next, complete signup and one provider test payment. Verify the paid record against the underlying website session timeline. It should show a plausible ordering of landing, application activity, identity, checkout, and confirmed payment. Also test a canceled checkout, failed payment, duplicate provider notification, and a successful payment where the buyer never returns to the success page.

Finally, compare aggregates. If one controlled buyer appears as two visitors, continuity failed. If the journey is intact but the payment is unmatched, checkout correlation failed. If the payment appears twice, event processing is not idempotent. These are different defects and should not be hidden under one "direct" bucket.

Protect campaign data through redirects and consent changes

UTM values are acquisition evidence, not an identity mechanism. Capture them on the first eligible landing and preserve the raw source context with the session. Do not append the full campaign query to every internal URL, because that can create duplicate URLs, overwrite source fields, and leak campaign details to destinations that do not need them.

Test redirect chains end to end. Link shorteners, authentication callbacks, locale redirects, and client-side routers can remove either campaign parameters or linker tokens. Define which component owns each redirect and verify that it preserves only the parameters required for the next trusted step. Talivia removes signed cross-domain tokens and checkout session IDs from stored URL queries after using them, according to its tracker configuration documentation.

Consent is another boundary. A choice made on one root may not automatically exist on another. Decide whether the domains share a consent system, require separate choices, or should begin tracking only after local consent. The implementation must match the laws and policies that apply to your users. Cross-domain capability does not override a refusal or create permission to collect more data.

Keep a concise data contract for every transferred field: purpose, source, destination, lifetime, validation rule, and deletion behavior. This makes privacy review and debugging easier than an undocumented collection of query parameters.

Turn a continuous journey into trustworthy revenue decisions

Once the path is stable, evaluate acquisition with paid outcomes rather than session volume alone. The UTM campaign revenue report can connect tagged acquisition to confirmed payments, while the session timeline provides the evidence behind a total. Compare paid customers, net revenue, refunds, and unattributed payments under a documented attribution model.

Continuity improves evidence, but it does not prove causation. A campaign may introduce the customer while product experience and sales conversations complete the purchase. Choose first-touch or last-touch rules based on the decision, keep the rule visible, and avoid moving historical customers between sources merely because they crossed another domain.

A practical rollout starts narrow: one marketing root, one application root, one signup event, and one checkout path. Configure subdomains with shared cookie scope, configure unrelated owned roots with a signed linker, and connect hosted payment through supported references plus provider-confirmed events. Validate one complete journey before adding more properties.

If fragmented domains are preventing you from connecting acquisition to paid outcomes, create a Talivia account, add the roots that genuinely belong to one customer journey, and deploy the generated tracker configuration unchanged. Then inspect a controlled session from campaign landing through test payment. The goal is not to eliminate every unknown. It is to build a limited, explainable chain where each attributed dollar can be traced to real session and payment evidence.

Keep reading

More from Talivia

Continue with the latest practical guides for analytics and revenue attribution.

2026-09-08

Subscription Revenue Attribution for SaaS

Learn how to connect SaaS acquisition sources to first payments, renewals, upgrades, refunds, and realized subscription revenue without overstating LTV.

Read article →
2026-09-07

Privacy-Friendly Analytics for SaaS: A Practical Guide

Build privacy-friendly SaaS analytics that minimizes data, respects consent, preserves useful journeys, and connects acquisition to verified revenue.

Read article →
2026-09-06

SaaS Conversion Tracking from Signup to Revenue

Build SaaS conversion tracking that connects acquisition, signup, activation, and verified payment without confusing funnel activity with revenue.

Read article →
Talivia

Connect website sessions and payments. See which traffic creates revenue.

Copyright © 2025-2026 Talivia. All rights reserved.

Product

Revenue attributionTraffic breakdownSession activitySearch ConsolePricingAI Agent KitBot trafficWebsite analytics

Compare

All alternativesDataFast alternativePlausible alternativeUmami alternativeGoogle Analytics alternativeSimple Analytics alternative

Resources

BlogDocumentationAI crawler directoryGitHubHow it worksFAQGet started

Legal

Privacy policyTerms of service