Setup & Integration

Debugging Browser Tracking

Diagnose client-side tracking behaviour using browser tools and SDK diagnostics.

When tracking signals are partially visible or inconsistent, browser-side debugging helps determine whether events are correctly captured and transmitted.

This page outlines practical steps to inspect SDK execution and validate signal delivery.

Verifying SDK Initialisation

First confirm that the tracking SDK is properly loaded.

Check the browser console:

  • no JavaScript errors related to Mark.init
  • SDK script successfully loaded from CDN or bundle
  • global Mark object available in script-tag integrations

If the SDK is not initialised, tracking events cannot be emitted.

Inspecting Event Transmission

Use the browser network inspector to verify that tracking requests are sent.

Recommended checks:

  • filter network requests by tracking endpoint domain
  • confirm requests are triggered after page load or interaction
  • validate that response status indicates successful delivery

Absence of outbound tracking requests usually indicates:

  • script execution blocked
  • consent gating active
  • event logic not triggered

Validating Visitor Identity Availability

Some hybrid or attribution features require a valid visitor identifier.

Test by:

  • opening browser console
  • executing Mark.getVisitorId() after consent is granted

If the value is undefined:

  • consent may still be pending
  • SDK initialisation may have failed
  • identity persistence may be blocked by browser settings

Visitor identity availability is essential for linking browser and server signals.

Checking Automatic Page View Behaviour

If page views are not recorded:

  • confirm autocapture: { pageview: true } is enabled
  • verify SPA routing events trigger tracking when applicable
  • ensure route changes occur after SDK initialisation

Incorrect routing configuration may lead to missing engagement signals.

Using Debug Mode For Integration Testing

During implementation, enabling debug logging can provide additional insight.

Typical debugging observations include:

  • SDK configuration confirmation messages
  • emitted event payload previews
  • consent state transitions

Debug mode should only be enabled during testing and disabled in production environments.

These diagnostic techniques help confirm that browser tracking operates reliably before analysing attribution or conversion data.