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

  1. Log in to your Anacoic Dashboard
  2. Click ”+ New Gateway”
  3. Enter a name (e.g., “Main Website”)
  4. 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

  1. Toggle Meta CAPI to enabled
  2. Enter your Pixel ID (found in Events Manager)
  3. Enter your Access Token (generate in Events Manager → Settings → Generate Access Token)
  4. Click Save

TikTok Events API

  1. Toggle TikTok Events to enabled
  2. Enter your Pixel Code (found in TikTok Ads Manager)
  3. Enter your Access Token (generate in TikTok Business Center)
  4. Click Save

Google Enhanced Conversions

  1. Toggle Google Ads to enabled
  2. Enter your Conversion ID (e.g., AW-123456789)
  3. Enter your Conversion Label
  4. Enter your Developer Token
  5. Click Save

Step 3: Install the Tracking Snippet

Go to the Installation tab and copy the snippet for your preferred method.

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:

  1. Go to the Domains tab
  2. Add a subdomain like metrics.yoursite.com
  3. Add the CNAME record to your DNS:
    metrics.yoursite.com → your-gateway-id.anacoic.com
  4. Wait for DNS propagation (usually 5-30 minutes)
  5. 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

  1. Go to the Simulator tab
  2. Send a test event
  3. Check the Live Logs tab to see the event with per-destination status
  4. 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_id with 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