Overview
Simple Analytics takes a fundamentally privacy-respecting approach to cross-domain tracking by treating each domain as an independent entity. This design philosophy ensures user privacy is maintained across your entire web presence while still providing valuable analytics insights for each property.
Unlike traditional analytics platforms that link user behavior across domains to build comprehensive profiles, Simple Analytics intentionally isolates each domain's data. This privacy-first architecture means you comply with GDPR and other privacy regulations without requiring cookie consent banners, even when operating multiple domains.
Simple Analytics Cross-Domain Philosophy
Privacy-Preserving Design
Simple Analytics' approach to multiple domains prioritizes user privacy:
- Independent Domains: Each domain is tracked as a separate website
- No Cross-Domain Cookies: No cookies that follow users between properties
- No User Tracking: Visitor journeys are not linked across domain boundaries
- Isolated Analytics: Each domain maintains its own statistics
- Referrer Preservation: You can still see traffic flowing between your domains via referrer data
Benefits of Domain Isolation
- Complete Privacy: Users cannot be tracked across your domain portfolio
- GDPR Compliance: No need for complex cookie consent mechanisms
- Clean Data: Each domain's analytics remain uncontaminated
- Simple Setup: Add each domain independently without complex configuration
- Transparent Tracking: Users know their behavior is not being linked across sites
Setting Up Multiple Domains
Step 1: Add Each Domain in Dashboard
For each domain you want to track, create a separate website in Simple Analytics:
- Log into your Simple Analytics dashboard
- Click Add website
- Enter your domain name (e.g., example.com)
- Click Add website
- Repeat for each additional domain
Example Setup:
- Website 1: example.com
- Website 2: shop.example.com
- Website 3: blog.example.com
Step 2: Install Tracking Code on Each Domain
Each domain uses the same Simple Analytics script but tracks to different properties:
Domain 1 (example.com):
<script async defer src="https://scripts.simpleanalyticscdn.com/latest.js"></script>
<noscript><img src="https://queue.simpleanalyticscdn.com/noscript.gif" alt="" referrerpolicy="no-referrer-when-downgrade" /></noscript>
Domain 2 (shop.example.com):
<script async defer src="https://scripts.simpleanalyticscdn.com/latest.js"></script>
<noscript><img src="https://queue.simpleanalyticscdn.com/noscript.gif" alt="" referrerpolicy="no-referrer-when-downgrade" /></noscript>
Domain 3 (blog.example.com):
<script async defer src="https://scripts.simpleanalyticscdn.com/latest.js"></script>
<noscript><img src="https://queue.simpleanalyticscdn.com/noscript.gif" alt="" referrerpolicy="no-referrer-when-downgrade" /></noscript>
Step 3: Domain Recognition
Simple Analytics automatically recognizes which domain the script is running on based on the page URL. No additional configuration is needed - the script reports data to the correct website automatically.
Analyzing Multi-Domain Traffic
Dashboard Navigation
Access each domain's statistics separately:
- Open Simple Analytics dashboard
- Use the website dropdown in the top navigation
- Select the domain you want to view
- All statistics shown are for that domain only
Understanding Referrer Data
While users aren't tracked across domains, you can still understand traffic flow through referrer analysis:
Check Referrers:
- Select a domain in your dashboard
- Navigate to Referrers section
- Look for your other domains in the list
- This shows how much traffic comes from your other properties
Example:
- On shop.example.com, you might see example.com as a referrer
- This indicates visitors clicked from main site to shop
- Individual visitors are not tracked, only aggregate counts
Combining Data from Multiple Domains
While Simple Analytics doesn't provide built-in cross-domain reporting, you can:
Option 1: Manual Aggregation
- Export data from each domain using the CSV export feature
- Combine in a spreadsheet or data analysis tool
- Create custom reports showing total traffic across properties
Option 2: API Integration
- Use Simple Analytics API to fetch data from each domain
- Aggregate programmatically in your own system
- Build custom dashboards combining multiple domains
Option 3: Use Tags
- Create tags for different domains (e.g., "main-site", "shop", "blog")
- View aggregate data across tagged properties
- Useful for high-level organizational reporting
Implementation Patterns
Multi-Brand Architecture
For separate brand domains under one organization:
<!-- brand-a.com -->
<script async defer src="https://scripts.simpleanalyticscdn.com/latest.js"></script>
<noscript><img src="https://queue.simpleanalyticscdn.com/noscript.gif" alt="" referrerpolicy="no-referrer-when-downgrade" /></noscript>
<!-- brand-b.com -->
<script async defer src="https://scripts.simpleanalyticscdn.com/latest.js"></script>
<noscript><img src="https://queue.simpleanalyticscdn.com/noscript.gif" alt="" referrerpolicy="no-referrer-when-downgrade" /></noscript>
Each brand's traffic is tracked independently with full privacy protection.
Subdomain Structure
For subdomain-based applications:
<!-- app.example.com -->
<script async defer src="https://scripts.simpleanalyticscdn.com/latest.js"></script>
<!-- docs.example.com -->
<script async defer src="https://scripts.simpleanalyticscdn.com/latest.js"></script>
<!-- api.example.com -->
<script async defer src="https://scripts.simpleanalyticscdn.com/latest.js"></script>
Each subdomain should be added as a separate website in Simple Analytics dashboard.
Marketing Site + Application Split
Common pattern for SaaS businesses:
<!-- marketing-site.com (public website) -->
<script async defer src="https://scripts.simpleanalyticscdn.com/latest.js"></script>
<!-- app.product.com (logged-in application) -->
<script async defer src="https://scripts.simpleanalyticscdn.com/latest.js"></script>
Track marketing and product usage separately while respecting user privacy.
Tracking Cross-Domain Interactions
Link Tracking Between Domains
While you can't track individual users across domains, you can track when links are clicked:
// Track when users click to another domain
document.querySelectorAll('a[href*="shop.example.com"]').forEach(link => {
link.addEventListener('click', () => {
sa_event('external_link_click', {
destination: 'shop.example.com',
source_page: window.location.pathname
});
});
});
This creates an event on the source domain showing clicks to the destination domain.
Form Submissions Across Domains
Track form submissions that lead to different domains:
document.getElementById('signup-form').addEventListener('submit', function(e) {
sa_event('signup_redirect', {
redirect_to: 'app.example.com'
});
});
Validation and Testing
Test Multi-Domain Setup
For Each Domain:
- Visit the Domain: Open the domain in your browser
- Open DevTools: Press F12
- Check Network Tab: Filter by "simpleanalyticscdn.com"
- Verify Script Load: Confirm latest.js loads successfully (200 status)
- Check Dashboard: Wait 5 minutes, then verify pageview appears
Cross-Domain Navigation Test:
- Start on Domain A (e.g., example.com)
- Click link to Domain B (e.g., shop.example.com)
- Verify pageview recorded on Domain B
- Check that Domain A appears as referrer in Domain B's dashboard
Verify Domain Recognition
Test that Simple Analytics correctly identifies each domain:
// Run in browser console on each domain
console.log('Current domain:', window.location.hostname);
console.log('SA script loaded:', typeof sa_event !== 'undefined');
Dashboard Verification Checklist
For each domain:
- Domain appears in website dropdown
- Pageviews are being recorded
- Referrer data shows correctly
- Events track to correct domain (if using events)
- No cross-contamination between domains
Troubleshooting
| Issue | Cause | Solution |
|---|---|---|
| Pageviews on wrong domain | Domain not added in dashboard | Add all domains as separate websites in dashboard |
| No referrer data between domains | HTTPS/HTTP mismatch | Ensure both domains use HTTPS |
| Domain not appearing | Not added to dashboard | Add domain explicitly in Simple Analytics settings |
| Missing pageviews | Script not installed | Verify script is present on all pages of each domain |
| Duplicate tracking | Script installed multiple times | Check for duplicate script tags in HTML |
| Events tracking to wrong site | Domain recognition issue | Ensure each domain is configured as separate website |
| Data appearing mixed | Subdomain configuration issue | Add each subdomain as unique website |
| No noscript fallback working | Image not loading | Verify noscript.gif URL is correct and accessible |
Best Practices
- Consistent Implementation: Use the same script structure across all domains
- Document Mapping: Maintain a list of which domains are tracked where
- Test Thoroughly: Verify tracking on each domain before launch
- Regular Audits: Periodically check that all domains are tracking correctly
- Monitor Referrers: Use referrer data to understand cross-domain traffic flow
- Use Events: Track cross-domain links with custom events for deeper insights
- Keep It Simple: Don't try to circumvent the privacy-first design
- Export Data: Regularly export data for cross-domain analysis if needed
Privacy Compliance
GDPR Considerations
Simple Analytics' cross-domain approach is GDPR compliant by design:
- No personal data collected
- No cross-domain user tracking
- No persistent identifiers
- No cookie consent required
- Data processed anonymously
Privacy Policy Language
Include this in your privacy policy when using Simple Analytics across multiple domains:
We use Simple Analytics on our websites to collect anonymous usage statistics. Simple Analytics does not track individual users across our domains, does not use cookies, and does not collect any personal data. Each domain's analytics are tracked independently to respect your privacy.