Quickstart: Fix Pixel Tracking
Set up ad blocker-proof tracking in under 5 minutes
Fix Pixel Tracking in 5 Minutes
This guide shows you how to bypass ad blockers and restore your conversion tracking using Anacoic’s server-side proxy.
Prerequisites
- A Facebook Pixel ID (or TikTok Pixel, or Google Ads Conversion ID)
- Access to your website’s code or tag manager
- An Anacoic account (Sign up at anacoic.com)
Step 1: Create a Gateway
- Log in to your Anacoic Dashboard
- Click ”+ New Gateway”
- Enter a name (e.g., “Main Website”)
- Click Create
Your gateway is now live with a default endpoint like:
https://your-gateway-id.anacoic.com/track
Step 2: Connect Your Ad Platform
Navigate to the Integrations tab in your gateway and configure your ad platform:
Meta (Facebook) CAPI
- Toggle Meta CAPI to enabled
- Enter your Pixel ID (found in Events Manager)
- Enter your Access Token (generate in Events Manager → Settings → Generate Access Token)
- Click Save
TikTok Events API
- Toggle TikTok Events to enabled
- Enter your Pixel Code (found in TikTok Ads Manager)
- Enter your Access Token (generate in TikTok Business Center)
- Click Save
Google Enhanced Conversions
- Toggle Google Ads to enabled
- Enter your Conversion ID (e.g.,
AW-123456789) - Enter your Conversion Label
- Enter your Developer Token
- Click Save
Step 3: Install the Tracking Snippet
Go to the Installation tab and copy the snippet for your preferred method.
JavaScript (Recommended)
Add this to your website’s <head>:
<!-- Anacoic Base Tracker -->
<script src="https://edge.anacoic.com/v1/tracker.js"
data-gateway="YOUR_GATEWAY_ID"
data-emq="optimize"></script>
Then track events:
// Track a page view (auto-tracked by base script)
anacoic.track('PageView');
// Track a purchase
anacoic.track('Purchase', {
value: 99.99,
currency: 'USD',
content_ids: ['SKU-123'],
user_email: '[email protected]' // Auto-hashed at edge
});
Server-Side (Node.js)
const response = await fetch('https://edge.anacoic.com/v1/track', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-Gateway-ID': 'YOUR_GATEWAY_ID'
},
body: JSON.stringify({
event_name: 'Purchase',
event_id: 'unique-123', // For deduplication
custom_data: {
value: 99.99,
currency: 'USD'
},
user: {
email: '[email protected]' // Will be SHA-256 hashed automatically
}
})
});
Step 4: Add a Custom Domain (Pro Plan)
Custom domains are available on Pro plans. For maximum reliability, use your own subdomain:
- Go to the Domains tab
- Add a subdomain like
metrics.yoursite.com - Add the CNAME record to your DNS:
metrics.yoursite.com → your-gateway-id.anacoic.com - Wait for DNS propagation (usually 5-30 minutes)
- Update your tracking snippet to use your custom domain
Pro Tip: Custom domains make your tracking requests indistinguishable from first-party requests, dramatically reducing false positives from ad blockers.
Step 5: Verify It’s Working
- Go to the Simulator tab
- Send a test event
- Check the Live Logs tab to see the event with per-destination status
- Verify in Facebook Events Manager / TikTok Events Manager that events are arriving
Troubleshooting
Events not showing in Facebook?
- Verify your Access Token hasn’t expired
- Check the Live Logs for error messages
- Ensure your Pixel ID is correct
Getting 403 errors?
- If you have Domain Locking enabled, add your website to the allowed origins in the Security tab
Events are duplicated?
- Make sure you’re sending a unique
event_idwith each event for deduplication
Next Steps
- Configure Domain Locking in your gateway’s Security tab
- Configure the Agent Gateway to make your site AI-ready
- Set up Custom Destinations in your gateway’s Destinations tab