# Facebook Ads

> Connect Facebook Ads with AnyTrack to enable Conversion API tracking and campaign reporting. Send server-side conversion data for better ad optimization and accurate attribution.

Connect your website or shop with Facebook using AnyTrack. As a Facebook Business Partner, AnyTrack simplifies integration without coding. Enhance ROAS, Event Match Quality, and attribution with real-time insights and optimization tools. To understand how AnyTrack uses the Meta Pixel, Conversion API, and Conversion API for CRM together, see [Meta Pixel vs CAPI vs CAPI for CRM](/docs/meta-pixel-vs-capi-vs-capi-for-crm).

> 📘 **TL**
>
> This article covers everything you need to know about integrating AnyTrack with Facebook Ads, including:
>
> 1. **Setup & Connection**: How to easily connect your website or shop with Facebook Ads through AnyTrack without any coding required.
> 2. **Conversion Tracking & Mapping**: How AnyTrack tracks conversions, handles data mapping, and ensures measurement accuracy.
> 3. **Data Orchestration**: How to optimize ad spend, create custom audiences, and access detailed campaign reports.
> 4. **Prerequisites for Integration**: What you need to have in place before starting the [Facebook Ads Integration](/docs/facebook-ads-troubleshooting-review) in AnyTrack.
> 5. **Step-by-Step Integration Guide**: Simple steps to connect Facebook Ads to AnyTrack, enable server-side tracking, and verify the connection.
> 6. **Verification and UTM Tracking**: How to verify your ads and install the UTM Tracking Template for precise conversion tracking.  
>    If you're ready to get started, you can skip ahead to the [How to Set Up Facebook Ads in AnyTrack](#how-to-set-up-facebook-ads-in-AnyTrack) section.

## Facebook Ads Integration Features

### Main Features

<Cards columns={2}>

  <Card title="Ads Reporting & Campaign Sync" icon="fa-duotone fa-solid fa-chart-bar">
    Access real-time campaign performance data directly in AnyTrack. Sync your Facebook Ads data for detailed reporting across all your marketing channels.

    - Unified reporting dashboard
    - Real-time campaign metrics
    - Cross-channel attribution
    - Performance analytics
  </Card>

  <Card title="Conversion API" icon="fa-duotone fa-solid fa-server">
    Server-side connection to Facebook's Conversion API for accurate conversion tracking that bypasses browser limitations and ad blockers.

    - Server-to-server tracking
    - Enhanced measurement accuracy
    - Improved Event Match Quality
    - Privacy-compliant data delivery
  </Card>

  <Card title="Lead Ads & CRM Conversions" icon="fa-duotone fa-solid fa-users">
    Track <a href='/docs/fb-lead-ads-instant-forms'>Meta Lead Ads with Instant Forms</a> and send CRM conversions to Facebook Conversion API to close the conversion loop.

    - Lead Ads campaign tracking
    - CRM conversion forwarding
    - Complete customer journey visibility
    - Offline conversion tracking
  </Card>

  <Card title="Tag Management" icon="fa-duotone fa-solid fa-code">
    AnyTrack automatically loads and manages your Facebook Pixel, ensuring proper initialization and complete event data capture without manual code implementation.

    - Automatic tag loading
    - No-code implementation
    - Proper pixel initialization
    - Centralized tag management
  </Card>

</Cards>

### Configuration & Management

<Cards columns={2}>

  <Card title="Connect Multiple Ad Accounts" icon="fa-duotone fa-solid fa-link">
    Connect multiple Facebook Ad accounts to a single AnyTrack property for consolidated reporting and management across all your advertising efforts.

    - Multi-account support
    - Centralized management
    - Consolidated reporting
    - Flexible account switching
  </Card>

  <Card title="UTM Parameters" icon="fa-duotone fa-solid fa-tag">
    Use AnyTrack's recommended <a href='/docs/facebook-utm'>UTM tracking template</a> with dynamic parameters for precise attribution.

    - Dynamic parameter insertion
    - Standard and custom parameters
    - Automated campaign tagging
    - Bulk template application
  </Card>

  <Card title="Event Mapping" icon="fa-duotone fa-solid fa-route">
    Map your website or platform events to Facebook's standard events or create custom event mappings directly from the AnyTrack dashboard.

    - Standard event mapping
    - Custom event support
    - Visual mapping interface
    - Event preview and testing
  </Card>

  <Card title="Custom Conversions" icon="fa-duotone fa-solid fa-bullseye">
    <a href='/docs/facebook-custom-conversions'>Create custom conversions</a> directly from the AnyTrack dashboard to track business-specific goals without additional code.

    - No-code custom conversions
    - Rule-based conversion creation
    - Advanced filtering options
    - Direct API integration
  </Card>

</Cards>

### Validation & Testing Tools

<Cards columns={3}>

  <Card title="Verify Ads Setup" icon="fa-duotone fa-solid fa-check-circle">
    Automatically verify that your UTM tracking template is correctly installed across all your Facebook campaigns with visual status indicators.

    - Red/yellow/green status marks
    - Campaign-level verification
    - Error detection and guidance
    - Bulk verification tool
  </Card>

  <Card title="Event Match Quality Dashboard" icon="fa-duotone fa-solid fa-star">
    Monitor and optimize your <a href='/docs/facebook-event-match-quality'>Event Match Quality scores</a> to improve attribution accuracy and ad performance.

    - Real-time EMQ monitoring
    - Score improvement suggestions
    - Parameter completeness tracking
    - Data quality insights
  </Card>

  <Card title="Test Mode" href="/docs/meta-capi-test-mode" icon="fa-duotone fa-solid fa-flask">
    View conversion data sent to Facebook in real-time to verify your integration is working correctly before going live.

    - Real-time event preview
    - Test event validation
    - Debug mode visibility
    - Pre-launch verification
  </Card>

</Cards>

## Meta Conversions API (CAPI) and Server-Side Tracking

The **Meta Conversions API** (CAPI) is Meta's server-side endpoint for receiving conversion events directly from your servers, complementing the browser-loaded Meta Pixel. Server-side delivery bypasses ad blockers, ITP cookie expiry, and abandoned page-loads. Conversions reach Meta even when the browser cannot fire the pixel.

AnyTrack runs the complete CAPI pipeline as a Meta Business Partner. No backend code required:

- **Authentication** — AnyTrack generates and rotates the CAPI access token when you authorize your Meta account.
- **Event mapping** — AnyTrack maps every AnyTrack event to a Meta Standard Event (`Purchase`, `Lead`, `CompleteRegistration`, etc.) and forwards it via CAPI.
- **PII hashing** — Customer email (`em`), phone (`ph`), name fields, and `external_id` are hashed with SHA-256 before they reach Meta. AnyTrack handles lowercase normalization automatically.
- **Cookie forwarding** — The `fbp` (browser ID) and `fbc` (click ID from `fbclid`) cookies are captured at landing and attached to every conversion so Meta attributes it to the right ad click.
- **Deduplication** — AnyTrack tags every conversion with a shared `event_id` so Meta deduplicates the browser pixel event and the server-side event when both fire.

The richer the user data AnyTrack forwards, the higher your **Event Match Quality** score — Meta's measure of how well CAPI conversions match real Facebook users. For tuning EMQ specifically, see [Event Match Quality](/docs/facebook-event-match-quality). For the cross-platform server-side architecture, see [Server-Side Tracking](/docs/server-side-tracking).

## Server-Side vs Browser-Side Tracking on Meta

Meta provides three tracking layers, and AnyTrack runs all of them in parallel:

| | Meta Pixel (Browser) | Conversions API (Server) | CAPI for CRM |
|---|---|---|---|
| **Where it runs** | Visitor browser | AnyTrack server | AnyTrack server |
| **Source of events** | Page loads, on-page actions | Backend purchase or lead events | CRM sales-stage advancements |
| **Blocked by ad blockers** | Yes | No | No |
| **Blocked by ITP / cookie expiry** | Yes | No | No |
| **Captures `fbp` and `fbc`** | Yes | Yes (forwarded by AnyTrack) | Yes (forwarded by AnyTrack) |
| **Hashes PII** | No | Yes (SHA-256) | Yes (SHA-256) |

The recommended setup is **all three layers active**, with a shared `event_id` so Meta deduplicates matched browser-and-server events. AnyTrack ships this hybrid configuration by default. Connect your Meta account and AnyTrack loads the Pixel and starts CAPI delivery on the same day. For the deep comparison of how the three layers fit together, see [Meta Pixel vs CAPI vs CAPI for CRM](/docs/meta-pixel-vs-capi-vs-capi-for-crm).

## How AnyTrack Works with Facebook Ads

<Tabs>

  <Tab title="The Process">
    Here's a simplified explanation of how AnyTrack seamlessly integrates with Facebook Ads to optimize your campaigns:

    <Cards columns={2}>

      <Card title="1. Visitor Interaction" icon="user">
        **When visitors land on your website**, the AnyTrack Tracking Tag activates:
        - Automatically loads the Facebook Tracking Tag (if not already present)
        - Collects essential data (UTM parameters, referrer data, <code>fbclid</code>)
        - Gathers first-party data (cookies, session IDs)
        - Activates AutoTag on trackable elements (carts, product links, forms)
      </Card>

      <Card title="2. Event Tracking" icon="mouse-pointer">
        **When visitors engage with your content**, AnyTrack automatically tracks:
        - Key events: <code>AddToCart</code>, <code>OutboundClick</code>, <code>FormSubmit</code>
        - Tags forms, links, and carts with tracking parameters
        - <a href='/docs/shopify'>Shopify</a>, <a href='/docs/clickfunnels'>ClickFunnels</a>, <a href='/docs/woocommerce'>WooCommerce</a> tracking
      </Card>

      <Card title="3. Event Processing" icon="cogs">
        **Tracked events are processed in real-time:**
        - Deduplication and normalization based on Facebook's requirements
        - Event Mapping to Facebook's standard events
        - Event Attributes matched to Facebook's expectations
      </Card>

      <Card title="4. Real-Time Reporting" icon="fa-duotone fa-solid fa-chart-bar">
        **Data Stream and Analysis**:
        - Real-time tracking data available across AnyTrack dashboard
        - Complete reports combining multiple data sources
        - Instant insights into campaign performance
      </Card>

    </Cards>

  </Tab>
  
  <Tab title="Data Flow Diagram">
    The integration follows this data flow:

    **Website Visitor** → **AnyTrack Tag** → **Event Processing** → **Facebook Conversion API** → **Campaign Optimization**

    Each step ensures data accuracy, compliance, and real-time attribution for optimal performance.
  </Tab>

</Tabs>

## How to Set Up Facebook Ads in AnyTrack (in 5 minutes)

> ⚠ ****
>
> - **An AnyTrack Property:** An active property acts as the connection point between your website or shop and AnyTrack. Learn how to <a href='/docs/create-property'>create a new property</a>
> - **A Connected Conversion Source:** A connected source from our <a href='/docs/integration-catalog'>Integration Catalog</a> to receive conversions sent to the `Conversion API`
> - **Facebook Business Manager Access:** Access with appropriate permissions to manage your Facebook Ads account and connect to AnyTrack

<Cards columns={1}>

  <Card title="Step 1: Connect Your Facebook Ads Account" icon="fa-duotone fa-solid fa-link">
    Connect your accounts to allow automatic syncing of campaign data and conversions through the Conversion API. No coding needed.

    1. Log in to AnyTrack, navigate to Tracking Tags, and click Connect Tag
    2. Follow the prompts to connect your Facebook Ads account
    3. Enable server-to-server tracking
    4. Save changes

    <Video align="center" alt="Connect your Facebook Ads account and enable server-to-server tracking" border={true} caption="Connect your website to the Facebook Conversion API in seconds" src={readmeAsset1} />

    > 📘 **Enable Server-to-Server Tracking**
    >
    > Enable the server-to-server tracking slider to send conversion events through a secure connection to the Conversion API. No code needed.
  </Card>

  <Card title="Step 2: Install the UTM Tracking Template" icon="fa-duotone fa-solid fa-code">
    The UTM Parameters Template allows AnyTrack to accurately identify and attribute conversions to the correct Facebook Ad.

    1. Select the connected Tracking Tag in the Tracking Tags section, click the Ads Integration tab, and copy the UTM Tracking Template
    2. Log in to Meta Ads Manager and navigate to the campaign level
    3. Access the option to add URL parameters
    4. Paste the tracking template with all necessary parameters (ad set name, ad ID, campaign ID)
    5. Verify your ads

    <Video align="center" alt="Install the UTM Tracking Template in Meta Ads Manager" border={true} caption="Install the UTM Tracking Template in Meta Ads Manager" src={readmeAsset2} />

  </Card>

  <Card title="Step 3: Verify Your Ads" icon="fa-duotone fa-solid fa-check-circle">
    Verify that your ads are properly configured after connecting and installing the UTM Tracking Template.

    1. Navigate to the Tracking Tags section and select the Facebook Tracking Tag for your campaigns
    2. Click the Ads Integration tab
    3. Click **Verify Ads Settings**. If correctly installed, you'll see a green mark next to your campaigns

    > 🚧 **Campaigns With Conversion Events Only**
    >
    > Verify Ads Settings only shows campaigns with conversion event objectives. <a href='/docs/advanced-options#campaigns-not-found-for-awareness-and-traffic-objectives'>Learn more</a>

    <Video align="center" alt="Use Verify Ads Settings to check if the UTM template is correctly installed" border={true} caption="Verify your ads have the correct UTM tracking template" src={readmeAsset3} />

    A red mark indicates the template was not found. A yellow mark signals the template is present but contains errors. Click to see the cause of the warning.

    <Image align="center" alt="Click the red or yellow mark to see the cause of the warning" border={true} caption="Click the ads to see the cause of the warning" src={readmeAsset4} />

    <a href="https://scribehow.com/shared/Verify_Your_Ads_for_Metas_UTM_Tracking_Template__8gZwG3PkR0ujz7zz4eteNA">Learn how to troubleshoot your UTM tracking template setup</a>
  </Card>
</Cards>

<Callout icon="📹" theme="default">
  ### Supplementary Video Tutorial

  Prefer a video? Check out this quick tutorial on how to connect your Facebook Pixel and Conversion API to AnyTrack.

  <Embed url="https://www.youtube.com/watch?v=OKedzhsb-ug" href="https://www.youtube.com/watch?v=OKedzhsb-ug" typeOfEmbed="youtube" html="%3Ciframe%20class%3D%22embedly-embed%22%20src%3D%22%2F%2Fcdn.embedly.com%2Fwidgets%2Fmedia.html%3Fsrc%3Dhttps%253A%252F%252Fwww.youtube.com%252Fembed%252FOKedzhsb-ug%253Ffeature%253Doembed%26display_name%3DYouTube%26url%3Dhttps%253A%252F%252Fwww.youtube.com%252Fwatch%253Fv%253DOKedzhsb-ug%26image%3Dhttps%253A%252F%252Fi.ytimg.com%252Fvi%252FOKedzhsb-ug%252Fhqdefault.jpg%26key%3D7788cb384c9f4d5dbbdbeffd9fe4b92f%26type%3Dtext%252Fhtml%26schema%3Dyoutube%22%20width%3D%22854%22%20height%3D%22480%22%20scrolling%3D%22no%22%20title%3D%22YouTube%20embed%22%20frameborder%3D%220%22%20allow%3D%22autoplay%3B%20fullscreen%3B%20encrypted-media%3B%20picture-in-picture%3B%22%20allowfullscreen%3D%22true%22%3E%3C%2Fiframe%3E" />

</Callout>

## Validate Your Facebook Integration

Once installed, the UTM template allows AnyTrack to track every visitor's journey from the Facebook ad click to conversion, providing detailed insights into your campaign's performance.

<Callout icon="⏰" theme="info">
**Data Freshness: When to Expect Conversions in Meta**

AnyTrack sends conversions in real-time to the Facebook Conversion API. Meta processes this data on its own schedule:

- **Event Manager**: 20 minutes for event parameters to appear. The Test Events Tool validates pixel events within 30 seconds.
  <Image align="center" border={true} src={readmeAsset5} className="border" />

- **Ads Manager**: Campaign metrics display in real-time, but conversion attribution takes up to 3 days for modeled conversions.
- **iOS campaigns**: Expect 24 hours to 60+ days delay due to Apple's SKAdNetwork privacy restrictions.
- **Data finalization**: Meta finalizes conversion data after 28 days. Numbers may adjust during this period as attribution models process incoming signals.

**Warnings**: Some warnings are normal when you first connect, as Facebook adjusts to the new data format. Persistent warnings may indicate configuration issues. See the <a href='/docs/facebook-ads-troubleshooting'>Troubleshooting Guide</a> to understand which warnings you can ignore and which need action.
</Callout>

### Validation Checklist

- [x] Check that you've connected the correct pixel ID.
- [x] Check that you've connected your ad account.
- [x] Check that you've enabled the Facebook Conversion API.
- [x] If you've updated the Event Mapping, verify that the events are being recorded in the Event Manager.
- [x] You've added the <a href='/docs/facebook-utm'>Facebook UTM Tracking template</a> to all your ads.
- [x] Check that you've selected the correct pixel and optimization event in your campaigns.
- [x] Check the Facebook Event Manager to ensure you don't see any Browser Events.

## Cross-Platform Integration

<Cards columns={2}>

  <Card title="Other Ad Platforms" icon="fa-duotone fa-solid fa-bullseye">
    **Expand Your Reach**: AnyTrack supports multiple advertising platforms beyond Facebook. Set up unified tracking across:
    
    - <a href='/docs/google-ads'>Google Ads</a> - Track Google's conversion data with enhanced attribution
    - <a href='/docs/tiktok-ads'>TikTok Ads</a> - Use TikTok's growing advertising platform
    - <a href='/docs/microsoft-ads'>Microsoft Ads</a> - Reach Bing's search audience effectively
    - <a href='/docs/taboola'>Taboola</a> - Native advertising with precise tracking
  </Card>

  <Card title="eCommerce Integration" icon="shopping-cart">
    **Connect Your Store**: Seamlessly integrate your eCommerce platform for complete conversion tracking:
    
    - <a href='/docs/shopify'>Shopify Integration</a> - Native plugin for automatic order tracking
    - <a href='/docs/woocommerce'>WooCommerce Integration</a> - WordPress eCommerce tracking
    - <a href='/docs/clickfunnels'>ClickFunnels Integration</a> - Funnel-based conversion tracking
    - Browse our complete <a href='/docs/integration-catalog'>Integration Catalog</a> for more platforms
  </Card>

</Cards>

<FaqAccordion
  title="Facebook Ads Integration FAQ"
  icon="fa-duotone fa-circle-question"
  items={[
    {
      question: "Do I need to add the Facebook Token in AnyTrack?",
      answer: "No. The AnyTrack app automatically generates the Facebook Token when you connect your AnyTrack account with Facebook.<br/><br/><img src='" + readmeAsset6.src + "' alt='Facebook Business Manager Integration' />"

    },
    {
      question: "How do I verify that my Conversion API is connected?",
      answer: "Open the Event Manager to see where the events are coming from. Check your <a href='https://www.facebook.com/settings/?tab=business_tools'>Business Manager Integration</a> page for the AnyTrack app."
    },
    {
      question: "How do I inspect conversions sent to the Facebook Conversion API?",
      answer: "Go to Facebook Event Manager, select the event, and open event details. Inspect each section to review data sent via AnyTrack.<br/><br/><img src='" + readmeAsset7.src + "' alt='Inspecting Conversions' />"
    },
    {
      question: "What is Facebook Ads integration in AnyTrack?",
      answer: "It allows you to track and attribute conversions from your Facebook Ads and sync conversion data for real-time optimization."
    },
    {
      question: "How do I set up Facebook Ads integration in AnyTrack?",
      answer: "Connect your Facebook Ads account, map events, and add the AnyTrack TAG to your website."
    },
    {
      question: "What is event mapping in AnyTrack?",
      answer: "Event mapping defines how your site events match Facebook standard or custom events for attribution. Learn more about <a href='/docs/event-mapping'>Event Mapping</a> configuration.<br/><br/><video src='" + readmeAsset8 + "' aria-label='Remap your AnyTrack events to the Facebook Pixel events.' autoplay loop muted playsinline controls preload='metadata'></video>"
    },
    {
      question: "What is the AnyTrack TAG?",
      answer: "A JavaScript snippet you add to your website's <code>&lt;head&gt;</code> section. It enables cross-platform conversion tracking and attribution. Learn how to install the <a href='/docs/install-anytrack-tag'>Tracking Tag</a>."
    },
    {
      question: "How do I add the AnyTrack TAG to my website?",
      answer: "Copy it from your dashboard and paste it in your website's <code>&lt;head&gt;</code> section. Use platform-specific options if you're on <a href='/docs/shopify'>Shopify</a>, <a href='/docs/wordpress'>WordPress</a>, etc."
    },
    {
      question: "What are the benefits of using AnyTrack with Facebook Ads?",
      answer: "Real-time conversion data, better ad optimization, and less manual tracking."
    },
    {
      question: "Can I use AnyTrack with other ad platforms?",
      answer: "Yes. AnyTrack supports <a href='/docs/google-ads'>Google Ads</a>, <a href='/docs/microsoft-ads'>Microsoft Ads</a>, <a href='/docs/tiktok-ads'>TikTok Ads</a>, and more. Check our complete <a href='/docs/integration-catalog'>Integration Catalog</a> for all supported platforms."
    },
    {
      question: "Do I need coding skills to use AnyTrack?",
      answer: "No coding needed. Just copy/paste the TAG—setup is beginner-friendly."
    },
    {
      question: "Can I use AnyTrack if I'm using a website builder or CMS?",
      answer: "Yes. It works with <a href='/docs/wordpress'>WordPress</a>, <a href='/docs/clickfunnels'>ClickFunnels</a>, <a href='/docs/shopify'>Shopify</a>, and more. Browse our <a href='/docs/integration-catalog'>Integration Catalog</a> for platform-specific setup guides."
    },
    {
      question: "Why should I load the Facebook pixel through AnyTrack?",
      answer: "Initializing the Tracking Tag via AnyTrack ensures complete event data, better match rates, and optimized tracking, something you cannot guarantee with third-party setups."
    },
    {
      question: "What is the difference between the Meta Pixel, Conversion API, and Conversion API for CRM?",
      answer: "The Meta Pixel (now called a Dataset) fires PageView and captures browser identifiers. The Conversion API sends all conversion events server-side, bypassing ad blockers. The Conversion API for CRM sends sales pipeline events from your CRM back to Meta. AnyTrack orchestrates all three automatically. See <a href='/docs/meta-pixel-vs-capi-vs-capi-for-crm'>Meta Pixel vs CAPI vs CAPI for CRM</a> for a full explanation."
    },
    {
      question: "Why do my AnyTrack conversions not match what I see in Meta Ads Manager?",
      answer: "AnyTrack sends conversions in real-time, but Meta can take up to 3 days to process modeled conversions and up to 28 days to finalize attribution data. iOS campaigns add further delay (24 hours to 60+ days) due to SKAdNetwork. Differences in attribution models also play a role: Meta uses post-click and post-view attribution, while AnyTrack uses last-click only."
    },
    {
      question: "How do I test that my Facebook Pixel events are being sent correctly through AnyTrack?",
      answer: "Follow these steps to verify your setup:<br/><br/><strong>1. AnyTrack Events Log:</strong> Go to your property's Events Log in AnyTrack. Trigger a test conversion (e.g., submit a form or complete a test purchase). You should see the event appear in real-time with a green status.<br/><br/><strong>2. Facebook Test Events Tool:</strong> In Meta Events Manager, open the <strong>Test Events</strong> tab. Events sent via the Conversion API will appear within 30 seconds of being triggered.<br/><br/><strong>3. Check Event Details:</strong> Click on any event in the Events Manager to inspect the parameters sent (event name, value, <code>fbclid</code>, etc.). Verify the data matches what you expect.<br/><br/><strong>4. Common Issues:</strong> If events don't appear, check that: (a) the Conversion API (server-to-server) is enabled in your Tracking Tag settings, (b) the UTM tracking template is installed on your ads, and (c) your Event Mapping is configured correctly."
    }
  ]}
/>

- [Removing Facebook Integration](/docs/removing-facebook-integration-from-systemeio)
- [Install AnyTrack Tag](/docs/install-anytrack-tag)

## Next Steps

<Cards columns={2}>

  <Card title="Explore Other Integrations" href='/docs/integration-catalog' icon="puzzle-piece">
    **Maximize Your Setup**: Browse our complete catalog of 50+ integrations to connect all your marketing tools and platforms.
  </Card>

  <Card title="Advanced Configuration" href='/docs/advanced-options' icon="cogs">
    **Fine-tune Your Setup**: Learn about advanced configuration options, custom events, and optimization techniques.
  </Card>

</Cards>
