Skip to content
whovisited.

Analytics troubleshooting · Conversion tracking

Why an analytics conversion goal does not match: a practical debugging checklist

Trace a missing WhoVisited conversion from the received event to the exact goal rule, website, enabled state, and report date window.

First, understand what “Test goal” proves

A conversion goal can look correctly configured and still show zero conversions. The quickest way to narrow the problem is to separate two questions: did the website send an event that WhoVisited retained, and does that event exactly match the goal selected in the report? Those are different checks.

In WhoVisited, Test goal searches the selected website's retained events for the goal's exact type and match value, then reports the most recent matching event time. It does not visit your page, run the tracker, create a sample event, or confirm that a future conversion flow works. A positive result proves that at least one matching event exists for that website; it does not by itself prove the goal is enabled or that a matching session falls inside the report's date range.

Use the checks below in order. That makes it easier to tell a collection problem from a rule mismatch or a report-window issue, without treating a zero as evidence that the whole analytics installation is broken.

1. Confirm the browser actually sent the success signal

Complete the real success flow in a clean browser session. For a page-view goal, load the final success route after the action succeeds. For an event goal, make the application call the tracker only after the server confirms the action. A button click, form submit attempt, or redirect starting is not the same as a completed signup or payment.

Open browser DevTools before the test and inspect Network for the WhoVisited event request. Check that the request is accepted, rather than blocked by consent, an extension, Content Security Policy, a wrong site installation, or an account's event limit. The browser API queues accepted events and sends them asynchronously, so check after the request has had time to complete. Do not put email addresses, form values, payment details, or other personal data in custom properties.

js
// Call only after your own application confirms success.
if (result.status === "paid") {
  window.whovisited?.track("checkout_paid");
}

If the request is absent, debug tracker loading, consent, network policy, and the success condition first. If a request is present but rejected, inspect its HTTP status and response before changing the goal rule. A goal cannot match an event that never reached and was not retained by the selected site.

2. Compare the exact event type and value

WhoVisited evaluates goals using exact equality. A success-page goal matches a page_view event whose stored pathname equals the configured path. A custom-event goal matches an event whose name equals the configured name. A page-view goal for /thanks will not match /thank-you, and checkout_paid will not match checkout_complete. Letter case and trailing slashes are part of the value too.

The tracker sends the origin and pathname, not the query string or fragment, and ingestion stores the parsed pathname. So configure /complete for https://example.com/complete?order=123#receipt, not the full URL. Query parameters can be useful to your app, but they are not part of the page-path goal value. Do not configure a broad wildcard: current goal matching does not interpret patterns or regular expressions.

  1. For a page-view goal, copy the pathname after the hostname, including its leading slash; omit ?query and #fragment.
  2. For a custom-event goal, use the exact event string passed to window.whovisited.track(...), including capitalization and underscores.
  3. Check trailing-slash behavior using the actual browser URL after all redirects or rewrites. /done and /done/ are different stored paths.
  4. Make sure you chose the same goal kind as the signal: page_view for a success route, event for a custom name.

In a Next.js App Router app, client-side navigation can change the route without a full document load. WhoVisited's tracker observes pathname navigation, but your success flow still needs to reach the final route and the tracker must be active for that transition. Next.js documents usePathname for reading the current pathname in a Client Component; layouts persist across navigation, so do not rely on a one-time layout render to detect every route change.

3. Check the selected website and goal state

Goals belong to a particular website. If your production tracker sends to one site while you are looking at a preview or another site in the workspace, the event will not satisfy that site's goal. Confirm the site name in both the installation snippet and the Growth or settings screen before changing the event name.

Also check whether the goal is active. The Test goal action can find a matching retained event even when a goal is paused, because it checks the stored rule against events. The Growth report, however, only loads enabled goals. A successful test paired with a missing report row can therefore mean the goal is paused rather than the tracker being broken.

  1. Select the same website that owns the tracker installation and the event request.
  2. Run Test goal again after the real success flow; the timestamp should identify a received matching event.
  3. If the test is positive but the goal is absent from Growth, confirm the goal is enabled and selected in the report.
  4. If the test says no matching event, compare the exact value and type before reinstalling the tracker.

4. Separate a matching event from a report conversion

The Growth report counts matching sessions whose session start falls inside the selected reporting window. The event may have been received later in that session, but a session that started outside the selected range is not included just because its success event is recent. Test goal searches retained events without applying that report date window, so its positive message and a zero in a short-range report can both be correct.

Compare the event timestamp with the report's selected range, then expand the range if needed. Allow for the dashboard's date and time-zone presentation, and avoid comparing a latest-event timestamp with an all-time or differently scoped conversion total. A goal counts a session once even if matching events repeat within it; it is not a count of every click or event row.

A repeatable verification sequence and its limits

  1. Choose the production site and note whether the goal is a page path or a custom event.
  2. Run one real success flow and confirm an accepted request in DevTools Network.
  3. Run Test goal and compare its latest received time with the test you just performed.
  4. Verify exact case, underscores, pathname, trailing slash, and goal type against the emitted signal.
  5. Enable the goal, select it in Growth, and choose a report range containing the session start.
  6. Repeat once in a fresh session; keep your product database or payment provider as the authoritative record of real outcomes.

WhoVisited goals help connect website sessions to a configured success signal; they are not a substitute for an order ledger or a guarantee that every browser event will be collected. Consent choices, blockers, browser privacy settings, network errors, quotas, and retention limits can all leave legitimate outcomes unobserved. Test goal proves a matching retained event exists, not that every visitor was tracked or that a conversion is financially confirmed.

For the underlying URL behavior, see MDN's URL pathname reference. For Next.js client-side route changes, see the official usePathname and layout documentation. The existing WhoVisited guide on choosing between success-page and custom-event goals explains how to choose the signal itself.

References and further reading

  1. MDN: URL.pathname
  2. Next.js: usePathname
  3. Next.js: Layout file convention
  4. WhoVisited: Success-page goals or custom events