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:
API Host:
CDN Host:
cdn.snitcher.com
API Host:
radar.snitcher.com
Configure CDN Proxy (cdn.your-app.com)
Configure CDN Proxy (cdn.your-app.com)
This proxy serves the
radar.js
script from your domain, building trust and improving reliability.1
1. Create CloudFront Distribution
Log in to the AWS Console, navigate to CloudFront, and click Create distribution.Click Create distribution. Once it’s deployed, copy the Distribution domain name (e.g.,
CloudFront Settings
- Origin
- Origin domain:
cdn.snitcher.com
- Protocol:
HTTPS only
- Origin domain:
- Default cache behavior
- Viewer protocol policy:
Redirect HTTP to HTTPS
- Allowed HTTP methods:
GET, HEAD, OPTIONS
- Cache policy: We recommend
CachingOptimized
(the default).
- Viewer protocol policy:
- Settings
- Alternate domain name (CNAME): Enter your desired subdomain, e.g.,
cdn.your-app.com
. - Custom SSL certificate: Select or request a certificate for your CNAME. This is required by AWS to serve traffic from your custom domain.
- Alternate domain name (CNAME): Enter your desired subdomain, e.g.,
d12345abcdef.cloudfront.net
) for the next step.2
2. Add CNAME Record in Your DNS
In your domain registrar’s DNS panel, create a new
CNAME
record pointing your branded subdomain to CloudFront.- Type:
CNAME
- Name / Host:
cdn
(orcdn.your-app
, depending on your provider) - Value / Points to: The CloudFront Distribution domain name you just copied.
3
3. Verify the Setup
Once DNS has updated, run the following command. A
403 Forbidden
response confirms the proxy is correctly pointed at Radar’s CDN but is blocking direct listing, which is expected.Configure API Proxy (api.your-app.com)
Configure API Proxy (api.your-app.com)
This proxy routes all tracking data through your branded endpoint, making Radar’s infrastructure invisible.
1
1. Create CloudFront Distribution
Create a second CloudFront distribution with settings optimized for a real-time API.Create the distribution and copy the new Distribution domain name.
CloudFront Settings
- Origin
- Origin domain:
radar.snitcher.com
- Protocol:
HTTPS only
- Origin domain:
- Default cache behavior
- Viewer protocol policy:
Redirect HTTP to HTTPS
- Allowed HTTP methods:
GET, HEAD, OPTIONS, PUT, POST, PATCH, DELETE
- Cache policy:
CachingDisabled
(managed policy). This is critical to ensure all API requests pass through to Radar without being cached. - Origin request policy:
AllViewerExceptHostHeader
(managed policy). This ensures headers, cookies, and query strings are forwarded to the Radar API.
- Viewer protocol policy:
- Settings
- Alternate domain name (CNAME):
api.your-app.com
- Custom SSL certificate: Select or request a certificate for your CNAME.
- Alternate domain name (CNAME):
2
2. Add CNAME Record in Your DNS
Create another
CNAME
record in your DNS settings:- Type:
CNAME
- Name / Host:
api
(orapi.your-app
) - Value / Points to: The CloudFront Distribution domain name for your API proxy.
3
3. Verify the Setup
Run a
curl
command to verify the API proxy. The server should respond, confirming the connection is live.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 You’ll receive a unique
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.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 Configuration Parameters:
tracking_script_id
you just generated.HTML
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 uniquetracking_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 likeYourAppName.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.
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.