Custom Domains
Learn how to configure custom domains to enhance security, performance and branding.
Custom Domain Setup
Setting up a custom domain for your web analytics and tracking needs offers significant benefits in terms of privacy, performance, and security. By using a custom domain like metrics.your-domain.com
, you gain greater control over your data and enhance your users' experience.
Privacy Benefits
With a custom domain, all tracking-related cookies are set on your own domain, not on ours (privacy.com) or any third-party domains like Facebook.com. This means you own and control the data collected, ensuring user privacy and compliance with data protection regulations.
- First-Party Cookies: Using a custom domain allows you to leverage first-party cookies, which are generally perceived as more trustworthy by users and are less likely to be blocked by browsers. This leads to more accurate data collection and a better understanding of user behavior.
- Stronger Content Security Policy (CSP): A custom domain enables you to implement a stricter CSP, further enhancing security by controlling the resources the browser is allowed to load. This helps prevent potential security vulnerabilities and protects your users from malicious attacks.
Performance Enhancements
A custom domain can improve website performance in several ways:
- Reduced Ad Tracker Interference: Ad trackers often block or slow down requests to third-party domains. By using your own domain, you minimize the impact of ad trackers on your website's performance, leading to faster loading times and a smoother user experience.
- Server-Side Cookie Management: Our custom domain implementation sets cookies server-side on your domain. These cookies tend to have longer lifespans and are less susceptible to browser restrictions, resulting in more persistent and reliable tracking.
Recommended Domain
We recommend using a subdomain like metrics.your-domain.com
for your custom domain. This clearly indicates the purpose of the domain and aligns with industry best practices.
Setup Instructions
Setting up your custom domain is a straightforward process:
- Contact your account representative: Reach out to your account representative to enable the custom domain feature for your account.
- Add DNS records: Your account representative will provide you with two DNS records to add to your domain's DNS settings. These records will direct traffic from your custom domain to our servers.
- Update Install configuration: Once the DNS records are successfully propagated, we'll make a minor adjustment to your Google Tag Manager Install configuration to activate the custom domain.
That's it! Your custom domain will be up and running, providing you with enhanced privacy, performance, and security.
Additional Features
In addition to proxying our Web SDK, your custom domain can also be used for:
- 1-pixel image tracking: The Ours 1-pixel image tracking URL also works with custom domains. Track user activity with our privacy-focused 1-pixel image tracking solution, hosted on your custom domain. This provides accurate tracking without relying on 3rd cookies or other potentially intrusive methods. See our documentation for more details: 1-pixel image tracking documentation
- Redirect tracking: The Ours redirect tracking also works with custom domains. Track redirects originating from your website using your custom domain. This allows you to monitor the effectiveness of your marketing campaigns and understand user flow. See our documentation for more details: Redirect tracking documentation
GTM Custom Domain Setup
- Add
https://metrics.custom-domain.com/*
in your Ours Template => Permissions => Injects Scripts - Add
https://metrics.custom-domain.com
in your Ours Install Tag:

Javascript Web SDK Custom Domain Setup
<!-- Ours Pixel Code -->
<script>
// Step 1. paste script from the app here
// Step 2. change cdn.oursprivacy.com/main.js => metrics.custom-domain.com/main.js
// Step 3. Call ours('init') with the optional custom_domain parameter
ours("init", "{{token}}", { custom_domain : "{{custom domain}}" });
</script>
Updated 18 days ago