Skip to content

03Getting started

Verify your installation

How to confirm the Gauss tracker works — debug mode in the console, requests in the Network tab, and common reasons events don't show up.

You can check your installation in a couple of minutes right in the browser: turn on debug mode and see which events the tracker prints and which requests go to the server.

Debug mode

There are two ways to turn on debugging:

  • add ?gauss_debug=1 to the page URL, for example https://example.com/?gauss_debug=1;
  • or add the data-debug attribute to the snippet:
html
<script defer data-debug data-site="YOUR_SITE_ID" src="https://collect.gausslab.io/js/gauss.js"></script>

Open the browser console (DevTools → Console). The tracker prints every event before sending it, prefixed with [gauss]: the event name and the object that goes to the server.

[gauss] page_view {v: 1, site: "k3f9x2ab", name: "page_view", page_location: "https://example.com/", …}
[gauss] user_engagement {v: 1, site: "k3f9x2ab", name: "user_engagement", params: {engagement_time_msec: 48200, scroll_depth_pct: 75}, …}

The ?gauss_debug=1 flag stores nothing on the device: the tracker checks the address when the page loads, so debugging works while the page is opened with this parameter. Remember to remove data-debug once you're done.

On localhost and in other excluded environments, debug mode still prints events but doesn't send them. That lets you check your custom events before going live.

[gauss] dropped … warnings are always printed, even without debug mode: that's how the tracker tells you it dropped an event with an invalid name or an extra parameter.

Network tab

  1. Open DevTools → Network and reload the page.
  2. Type api/event in the filter.
  3. Look for the POST https://collect.gausslab.io/api/event request.

Each event is a separate request. The body is JSON sent as text/plain, so the browser makes no CORS preflight request. The tracker sends events with navigator.sendBeacon, falling back to fetch with keepalive. In Chrome, sendBeacon requests show up with the type ping.

To see user_engagement, switch to another tab and come back: the event is sent when the page is hidden. Turn on Preserve log in DevTools, or requests made as you leave a page disappear from the list.

Why you don't see events

CauseWhat to check
The site is running locallylocalhost, 127.*, *.local and file: don't send events. Test on the published site or use debug mode
Site builder previewin the editor and preview, the site runs inside an <iframe>, so no events go out. Open the published version
Ad or tracker blockerturn off extensions or open the page in a browser profile without them
Content Security Policythe console shows a CSP violation error. Add https://collect.gausslab.io to script-src and connect-src, see Installation
Wrong Site IDwith an invalid format, the tracker doesn't start and prints nothing. See the check below
Snippet missing on some pagesview the page source: the tag should be in the <head>
Snippet added twiceeach navigation produces two page_view events, so keep one tag

To check the Site ID, run this in the page console:

js
const id = document.querySelector('script[data-site]')?.dataset.site;
console.log(id, /^[a-z0-9]{8,16}$/.test(id || ''));

If it prints false, data-site has an extra character, a space or an uppercase letter: a Site ID is 8–16 lowercase Latin letters and digits. If it prints true but there are still no events, compare the value with the Site ID in your account.

One more check: run typeof gauss in the console after the page loads. If the tracker started, it returns "function" and the function has no q property. If gauss.q is an array, only the queue stub is running and the tracker itself didn't start: the script is blocked or the Site ID is invalid.

Checking in the dashboard

The dashboard is in private beta. Request access at beta application.

  • Waiting for the first event. After you add a site, the dashboard waits for the first event and shows the installation status. The status updates within 10 seconds of the first event; if no data arrives for 24 hours, the dashboard shows that too.
  • Live event feed. Your site's latest events appear in the feed within 5 seconds of being sent. Each event expands into JSON, the way it was stored after processing. Rejected events appear in the feed too, with the reason. The feed is available to members with the owner and admin roles.

Apply for the beta

The beta is closed and limited to 20–30 sites. We review every application and reply by email with the price and terms.

Without https:// or a path.