ReplySparrow Docs

Website visitors and cookie consent

What the website visitor snippet stores and sends, and how to start it only after a visitor accepts your cookie banner.

Coming soon

This part of ReplySparrow is not available yet. This page fills in when it ships.

Coming soon

The Website visitors source is not available yet. This page describes how it will work once it ships, so you can prepare your privacy notice and cookie banner. The snippet, endpoint and host names below are subject to change until launch.

The Website visitors source identifies the companies that visit your site, never the person. It runs on a small snippet you install on your website, which reports each page view to ReplySparrow. Where the law requires consent for this kind of tracking (for example under the GDPR and the ePrivacy rules in Europe), start the snippet only after the visitor accepts your cookie banner. This page shows how.

You are the data controller

You are responsible for the tracking on your own site. Before installing the snippet, make sure you have a privacy notice that mentions it, a consent mechanism where one is required, and the authority to install it.

What the snippet stores and sends

The snippet stores nothing in the visitor's browser: no cookies, no localStorage, no fingerprinting. On each page view it requests a 1×1 image from ReplySparrow, and that request carries:

DataWhere it comes fromWhat ReplySparrow keeps
Page URLlocation.hrefThe URL, up to 500 characters
Referrerdocument.referrerThe referrer, up to 500 characters
IP addressThe request itselfA salted hash only, to count repeat visits. The raw IP is never stored
CompanyThe IP, looked up with IPinfoThe company name and domain, when the IP belongs to a business

Visits are kept for 180 days. Only business IP ranges are matched to a company; visits from home internet providers, mobile networks and hosting providers stay anonymous and never become a signal.

When a company is identified, ReplySparrow records a Visited your website signal on that company, at most once per company per day, and on up to 25 contacts you already have there. Your agents can then use it like any other signal.

Example wording for your privacy or cookie policy:

We use ReplySparrow to find out which companies visit our website. When you view a page, your IP address, the page address and the referring page are sent to ReplySparrow, which matches the IP address to the company it belongs to using IPinfo. ReplySparrow keeps the company, the pages viewed and a one-way hash of the IP address for up to 180 days. No cookies are stored in your browser.

Coming soon

The snippet below shows the planned format. Your own snippet, with your workspace token, will be available in ReplySparrow when the Website visitors source launches.

The snippet contains a pixel token that links the visits to your workspace. As planned, it sends the page view as soon as the page loads:

<!-- ReplySparrow website visitors -->
<script>(function(){var i=new Image();i.src="https://app.replysparrow.com/api/t/v/YOUR_PIXEL_TOKEN?u="+encodeURIComponent(location.href)+"&r="+encodeURIComponent(document.referrer)+"&t="+Date.now();})();</script>

Turn the snippet into a function

Replace the snippet with this version. It defines window.kairoVisit() but sends nothing until it is called. Keep your own token in place of YOUR_PIXEL_TOKEN:

<!-- ReplySparrow website visitors: sends the page view only when kairoVisit() is called -->
<script>
  window.kairoVisit = function () {
    if (window.kairoVisit.sent) return;
    window.kairoVisit.sent = true;
    var i = new Image();
    i.src = 'https://app.replysparrow.com/api/t/v/YOUR_PIXEL_TOKEN'
      + '?u=' + encodeURIComponent(location.href)
      + '&r=' + encodeURIComponent(document.referrer)
      + '&t=' + Date.now();
  };
</script>

Put it in the <head>, before your cookie banner's script, so the function exists when the banner reports a choice.

Call kairoVisit() when the visitor accepts

In your cookie banner's "Accept" handler, call:

window.kairoVisit && window.kairoVisit();

The page view is then sent. Ready-made examples for common banners are below.

Call it again on every page for returning visitors

ReplySparrow doesn't remember the choice, since it stores nothing in the browser: call kairoVisit() on every page load where the visitor has already accepted. Most banners fire their accept event or callback on page load when consent was given earlier; if yours doesn't, read its stored consent and call kairoVisit() yourself.

Calling it twice on the same page does nothing more: one page view is sent per page load.

The original snippet sends the page view as soon as the page loads. ReplySparrow doesn't detect your cookie banner on its own: calling kairoVisit() from your banner is the only consent gate.

Pick the consent category that your privacy notice lists company identification under, usually marketing. Each example assumes the snippet from step 1 is already on the page.

// Wherever your banner reports that the visitor accepted.
function onCookieConsentAccepted() {
  window.kairoVisit();
}

If your banner stores the choice itself, apply it on page load too:

if (localStorage.getItem('cookie_consent') === 'granted') {
  window.kairoVisit();
}

Some setups block every third-party script until consent, for example a Google Tag Manager tag that fires only after consent, or a banner that only activates blocked scripts after "Accept". In that case, add the original snippet to that tag or blocked script. It then runs, and sends the page view, only once the visitor accepts.

Either way, no request goes to ReplySparrow before "Accept": the snippet is inline, so there is no script to download from ReplySparrow beforehand.

Check that it works

  1. Open your site in a private window and open the browser's developer tools.
  2. Before accepting, the Network tab shows no request to app.replysparrow.com.
  3. Accept the banner: a request to /api/t/v/... appears and returns a 1×1 GIF.
  4. Application → Cookies shows no new cookie from ReplySparrow, before or after accepting.

The pixel always answers with the same image, even when the token is wrong, so that it can never break your page. Identified companies show up in ReplySparrow, not in the response.

Content Security Policy

If your site sends a Content Security Policy header, allow:

DirectiveValueWhy
img-srchttps://app.replysparrow.comThe page view is sent as an image request
script-srcA 'sha256-...' hash or 'nonce-...' for the snippet, or 'unsafe-inline'The snippet is an inline script

No connect-src entry is needed. If the snippet moves to a hosted script before launch, this table will list its host.

Good to know

  • Withdrawn consent. ReplySparrow stores nothing in the browser, so there is nothing to delete when a visitor withdraws consent: once your banner stops calling kairoVisit(), no further page views are sent. Page views already sent stay in ReplySparrow for up to 180 days.
  • IPinfo. Companies are identified with IPinfo, which receives the visitor's IP address. List it in your privacy notice as a processor where your notice names them.
  • Rate limit. ReplySparrow accepts up to 60 page views per minute from the same IP address for your token; extra views are dropped silently.
  • Not live yet. Until the Website visitors source launches, don't install the snippet: the format, endpoint and hosts on this page may still change.

On this page