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.comConfigure 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. You will be guided through a multi-step wizard.Step 1: Get Started
Step 2: Specify Origin
Step 3: Enable Security
Step 4: Get TLS Certificate
Step 5: Review and Create
- Distribution name (optional): Give your distribution a memorable name, like
YourApp Radar CDN. - Custom domain: Enter your desired subdomain (e.g.,
cdn.your-app.com).
Step 2: Specify Origin
- Specify origin type: Select Other.
- Custom origin: Enter
cdn.snitcher.com. - Settings: Keep the defaults. Select Use recommended origin settings and Use recommended cache settings. These defaults are optimized for custom origins and will handle caching, allowed methods (
GET,HEAD), and protocol policies (Redirect HTTP to HTTPS) correctly.
Step 3: Enable Security
- Web Application Firewall (WAF): For this basic setup, you can select Do not enable security protections.
Step 4: Get TLS Certificate
- A Custom SSL certificate is required to use your custom domain. You must have a certificate for your domain (e.g.,
cdn.your-app.com) available in AWS Certificate Manager (ACM) in the us-east-1 region. - CloudFront will automatically find and select the correct certificate for the custom domain you entered in Step 1.
Step 5: Review and Create
- Review the summary of your settings to ensure they are correct.
- Click Create distribution.
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(or the subdomain you chose) - Value / Points to: The CloudFront Distribution domain name you just copied.
3
3. Verify the Setup
Once DNS has updated, run the following command in your terminal. A
403 Forbidden response is expected and confirms the proxy is working correctly.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. Go to the AWS Console, navigate to CloudFront, and click Create distribution.Step 1: Get Started
Step 2: Specify Origin
Step 3: Enable Security
Step 4: Get TLS Certificate
Step 5: Review and Create
- Distribution name (optional):
YourApp API Proxy - Custom domain:
api.your-app.com
Step 2: Specify Origin
- Specify origin type: Select Other.
- Custom origin: Enter
radar.snitcher.com. - Settings: This is the most critical step. Select Customize cache settings.
- Cache policy: From the dropdown, select the managed policy named
CachingDisabled. This ensures API requests are never cached and are always passed through in real-time. - Origin request policy: Select the managed policy named
AllViewerExceptHostHeader. This forwards all necessary headers, cookies, and query strings to the Radar API.
- Cache policy: From the dropdown, select the managed policy named
Step 3: Enable Security
- Web Application Firewall (WAF): Select Do not enable security protections.
Step 4: Get TLS Certificate
- A Custom SSL certificate for
api.your-app.commust be available in AWS Certificate Manager (ACM) in the us-east-1 region. CloudFront will automatically select it.
Step 5: Review and Create
- Review the settings and click Create distribution.
- Wait for the distribution to deploy, then copy the Distribution domain name (e.g.,
d67890uvwxyz.cloudfront.net).
2
2. Disable IPv6 (Important)
After the distribution is created and deployed, you must disable IPv6.
- In the CloudFront distributions list, click on the ID of the API proxy distribution you just created.
- Under the General tab, click Edit.
- Scroll down to the Settings section.
- Find the IPv6 option and select Off.
- Click Save changes.
3
3. 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 you copied for your API proxy.
4
4. Verify the Setup
Run a
curl command to verify the API proxy. The server should respond with a message 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_idgenerated 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.waitForConsent: (Optional) When set to true, the tracker will wait until a visitor has given cookie consent before saving any data in their browser. If consent isn’t given, the tracker will still work but will only keep data for the current visit (not saved after the browser is closed). The default is false. See Consent Management for more details
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.