Installing Radar is a two-part process. First, you’ll perform a one-time setup to brand the tracking infrastructure with your own domains. After that, you’ll follow a simple workflow to generate and deploy a unique tracker for each of your customers.

Prerequisites

Before installing Radar, ensure you have:
  • A Snitcher account with Radar access. Contact support to enable it.
  • Your API key for accessing the Radar Operator API.

Part 1: One-Time Branding Setup (Whitelabeling)

This branding setup is highly recommended for a true whitelabel experience. However, it is optional. If you prefer to get started quickly without configuring custom domains, you can skip this section and use the default Snitcher-branded hosts in your loader script:

CDN Host: cdn.snitcher.com
API Host: radar.snitcher.com
To make Radar feel completely native to your product, you’ll proxy its core services through your own branded domains. This is crucial for maintaining a seamless user experience and ensuring first-party data collection. The following guides walk through setting this up with AWS CloudFront, a common and reliable choice.

Part 2: Customer Installation Workflow

Once your branded domains are ready, you can start generating trackers for your customers.
1

Generate a Tracking Script

For each customer, make a POST request to the Generate a Tracking Script endpoint.Include an internal_identifier that maps to the customer’s ID in your own system. This identifier will be included in every webhook event, making it easy to associate data with the correct customer account.
curl -X POST 'https://api.snitcher.com/radar/operator/v1/tracking-scripts' \
     -H 'Authorization: Bearer YOUR_API_KEY' \
     -H 'Content-Type: application/json' \
     -d '{
       "internal_identifier": "customer-abc-123",
       "description": "Tracking script for Customer ABC"
     }'
You’ll receive a unique tracking_script_id for this customer.
2

Provide the Loader Script

Construct the loader script for your customer to install on their website. It’s crucial to populate the configuration object with your branded domains and the tracking_script_id you just generated.
HTML
<script>
  !function(e){"use strict";var a=e&&e.namespace;if(a&&e.profileId&&e.cdn){var r=window[a];if(r&&Array.isArray(r)||(r=window[a]=[]),!r.initialized&&!r._loaded)if(r._loaded)console&&console.warn("[Radar] Duplicate initialization attempted");else{r._loaded=!0;["track","page","identify","group","alias","ready","debug","on","off","once","trackClick","trackSubmit","trackLink","trackForm","pageview","screen","reset","register","setAnonymousId","addSourceMiddleware","addIntegrationMiddleware","addDestinationMiddleware"].forEach((function(e){var i;r[e]=(i=e,function(){var e=window[a];if(e.initialized)return e[i].apply(e,arguments);var r=[].slice.call(arguments);return r.unshift(i),e.push(r),e})})),r.bootstrap=function(){var a=document.createElement("script");a.async=!0,a.type="text/javascript",a.id="__radar__",a.dataset.settings=JSON.stringify(e),a.src="https://"+e.cdn+"/releases/latest/radar.min.js";var r=document.scripts[0];r.parentNode.insertBefore(a,r)},r.bootstrap()}}else"undefined"!=typeof console&&console.error("[Radar] Configuration incomplete")}({
    "cdn": "cdn.your-app.com",
    "apiEndpoint": "api.your-app.com",
    "profileId": "ts_a1b2c3d4e5f6g7h8",
    "namespace": "YourAppName"
  });
</script>
Configuration Parameters:
  • cdn: (Required) Your custom CDN proxy domain (e.g., cdn.your-app.com).
  • apiEndpoint: (Required) Your custom API proxy domain (e.g., api.your-app.com).
  • profileId: (Required) The unique tracking_script_id generated for the customer.
  • namespace: (Required) 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 your entire customer base. This simplifies your own documentation, as you can always instruct your customers to use the same object name. It also prevents conflicts with other scripts on your customer’s site.
All of these settings and more can be customized. See the full Configuration Reference for a complete list of options, including how to enable powerful features like automatic session, form, and click tracking.
3

Verify Installation & Receive Events

Ask your customer to place the script in the <head> section of their website. Once the script is live, Radar will immediately begin to capture events.You can verify the installation is working by checking your configured webhook endpoint for incoming data.