Skip to main content

tolt_referral is null

What it means when window.tolt_referral returns null, and how to check that tracking works.

Written by Nick

You check window.tolt_referral in your browser and it returns null, so no referral is sent to your billing provider.

You haven't visited through a partner link

If window.tolt_referral is null rather than undefined, the tracking script is installed. It just hasn't recorded a referral yet, because it's only set for visitors who arrive through a partner link.

  1. Create a test partner, or sign up as one in your partner portal, and copy their link.

  2. Open your website through that link, in a private browser window.

  3. In your browser console, run await tolt.ready().

It now returns a click_id and a partner_id, and window.tolt_referral holds the referral. Tracking works.

It's undefined instead

If window.tolt_referral is undefined, the tracking script isn't loading on the page. Check that the script from Settings › Tracking script is inside the <head> tag of that page, and that an ad blocker isn't stopping it.

Good to know

  • If your site's router rewrites the URL before the script loads, the ?ref= parameter is lost. Load the script in the initial HTML so it runs first.

  • Contact us via chat with the URL of the page you tested, the partner link you used and what window.tolt_referral returned, and we'll take a look.

  • For a full end-to-end check, see Test the integration.

Did this answer your question?