Basic Configuration
These are the essential parameters required to get Radar running.The unique tracking script ID generated for each of your customers via the Operator
API. This
ensures data is routed to the correct account.
The name of the global JavaScript object your customers will use to interact
with the tracker (e.g.,
YourAppName
). This allows them to call functions
like YourAppName.track("Custom Event")
. We recommend using a single,
consistent namespace across all customers.Your custom CDN proxy domain (e.g.,
cdn.your-app.com
). Defaults to
cdn.snitcher.com
if not provided.Your custom API proxy domain (e.g.,
api.your-app.com
). Defaults to
radar.snitcher.com
if not provided.Feature Flags
Thefeatures
object allows you to enable or disable specific automatic tracking capabilities.
When
true
, Radar will automatically track user sessions, including session
start, end, and updates. This is required for session-based delivery.When
true
, Radar automatically tracks pageviews and page leaves, including
engagement time on each page.When
true
, enables automatic tracking of form interactions, including:form_start
: When a user first interacts with a form.form_submit
: When a form is submitted.form_abandon
: When a user interacts with a form but leaves the page before submitting.
password
, credit_card
).When
true
, automatically captures clicks on links, buttons, and elements with a data-track-event
attribute.When
true
, automatically tracks clicks on links that point to files with common document extensions (e.g., .pdf
, .docx
, .zip
).When
true
, the tracker will report its own internal JavaScript errors to Snitcher for debugging purposes.Consent Management
If set to
true
, Radar will not use persistent storage (cookies or localStorage
) until the giveCookieConsent()
method is called. This is essential for complying with privacy regulations like GDPR. See the Consent Management guide for more details.Advanced Transport Configuration
Thetransport
object lets you fine-tune how data is sent to Radar’s servers.
The number of events to queue before sending them to the API in a single batch.
The maximum time in milliseconds to wait before sending a batch, even if the
batchSize
hasn’t been reached.When
true
, Radar will attempt to use the navigator.sendBeacon()
API to send any queued events when the user navigates away from the page. This is highly reliable for capturing last-minute interactions.An array of event names to prevent from being sent. For example,
['$pageview']
would block all automatic pageview events.