Meta Ad Tracking: Pixel & Conversion API Explained


In this tutorial, we'll take a look at the importance and challenges of ad tracking, focusing on Meta's solutions: Pixel and Conversion API. We'll explore how they work, their pros and cons, and the synergy between them.

The Evolving Tracking Landscape #

In the past, Meta Pixel (formerly Facebook Pixel) allowed advertisers to rely on incredibly accurate data to run successful Facebook ad campaigns.

    Why Accurate Data Matters:

  1. Targeting : By tracking user interests, demographics, and online behaviour, you can create targeted audiences and build “lookalike audiences” of new users who share similar characteristics.

    This results in decreased wasted impressions and clicks, leading to a lower cost per conversion and higher conversion rates compared to broader targeting.

  2. Optimising: By tracking user activity, you can monitor the performance of your ads. You can see which ads are getting clicks, conversions, and other desired actions, and which ones aren’t.

    This data helps you optimise your campaigns by focusing on what’s working and what’s not, resulting in further cost reduction.

  3. Measuring: By tracking user activity, you can measure the ROI of your Meta ad campaigns.

    This shows you how much revenue you’re generating from your ad spend, helping you determine if your campaigns are financially successful.

However, the landscape of tracking changed dramatically with the introduction of Apple’s App Tracking Transparency (ATT) framework in iOS 14.5.

apple ios14 opt in consent for advertising

This new requirement for user opt-in for ad tracking across apps and websites restricted Facebook’s access to data previously collected through Meta Pixel, making it challenging for advertisers to assess the effectiveness of their ads and make informed decisions.

This not only impacted advertisers but also affected Meta’s machine learning processes, hindering its ability to optimise campaigns based on accurate data.

Apple’s iOS 17 brought another layer of tracking restrictions with LTP (Link Tracking Protection). This feature automatically removes certain tracking parameters from URL links when they are opened in Safari’s private browsing mode, Apple Mail, and Messages, further impacting how advertisers measure and optimise campaigns.

In a recent article, Meta has officially estimated that it is underreporting iOS web conversions by approximately 15% in total.

Adding to the complexities of tracking user activity, the widespread adoption of ad-blockers and increasingly privacy-focused browser settings, further complicate the landscape.

Major browsers like Chrome, Firefox, and Safari offer built-in privacy features that restrict tracking:

  • Blocking third-party cookies, which are often used to track user behaviour across websites.

  • Disabling cross-site tracking, preventing websites from tracking users’ browsing activity across different sites.

  • Offering private browsing modes that limit data collection and storage.

In response to these challenges Meta developed Conversions API (or CAPI for short).

meta release conversions api

A tracking tool designed to complement the Meta Pixel: It doesn’t replace the Pixel; it works in tandem with it.

While both serve the same purpose (tracking user activity), their approaches differ significantly.

Here’s a brief overview of how they work and their pros and cons.

Meta Pixel (Client-Side Tagging) #

How it works #

The Meta Pixel is a piece of client-side code, meaning it is placed directly on your website, which tracks user actions (like page views, clicks, purchases) and sends this data directly from the browser to Facebook’s servers.

Meta Pixel Workflow - 3P Direct Match

Meta Pixel workflow:

  1. Event Trigger: A specific user event occurs on your website or app (e.g., purchase, lead generation, page view).
  2. Data Collection: Typically the event data is collected via client-side code and third-party cookies.
    1. Client-side code directly collects event data related to user actions on your website, such as event name, page URL, custom parameters, and limited user-specific data (e.g., device ID, browser information, timestamp).
    2. Third-party cookies, with user consent, can provide additional data, such as unique identifiers for cross-website tracking.
  3. Data Processing: Once collected, Meta securely processes the event data:
    • Using cookies data for ad targeting and personalisation.

      ⓘ Direct Match: When the Pixel receives information from cookies, it can directly compare the data collected from cookies with existing user profiles stored within Meta’s systems to potentially identify a specific user. This process is referred to as ‘direct match’. If a match is found the Pixel can access a richer set of user information, including demographics, interests, and past browsing behavior. This information can then be used for ad targeting and personalisation, but only within the parameters of user consent and data privacy regulations.

    • Using Client-side data for ad measurement and optimisation.

      ⚠︎ No Direct Match: Client-side code, on its own, cannot directly identify and link to specific user profiles in Meta’s database. The information it collects (event details and limited user-specific data) is insufficient for attempting a direct match. This data is primarily used for ad measurement and optimization, but not for direct user identification.

Pros #

  • (A) Simple and free implementation: Meta Pixel only requires adding a small snippet of code on your website to start collecting event data at no cost. Much easier and more economical than server-side integration.
  • (B) Flexible event tracking: With Meta Pixel, you can track a wide variety of customisable events beyond just conversions, such as add-to-carts, page views, button clicks etc.
  • (C) Retargeting capabilities: Meta Pixel collects data on user actions on your website, enabling the creation of custom audiences based on specific actions users have taken on your site, to retarget across Meta apps.
  • (D) Conversion Tracking: Meta Pixel tracks when users complete desired actions on your website (e.g., purchases, sign-ups), allowing to measure the campaign success.

Cons #

  • (A) Reliance on Third-Party Cookies: Meta Pixel depends on third-party cookies for tracking user activities across different websites. However, the effectiveness of these cookies is diminishing as more users, browsers, and devices opt to restrict or block them.

    This limits cross-site tracking (understanding user journeys across different websites) making campaign optimisations based on cross-site behaviour challenging.

  • (B) Impact of Changing Privacy Regulations: Platform privacy updates, like iOS 14 ATT and upcoming regulations (like GDPR in the EU), restrict the types of data you can collect and use.

    This means fewer targeting options and difficulty in accurately attributing conversions, making campaign analysis less precise.

  • (C) Client-Side Dependencies: Meta Pixel is also influenced by factors on the client’s side, such as website performance, ad blockers, and user connectivity.

    These external factors, which businesses cannot control, can lead to inaccurate or incomplete tracking data, resulting in wasted ad spend, targeting irrelevant audiences, and misattribution of conversions.

Conversion API (Server-Side Tagging) #

In response to the client-side limitations, Facebook has introduced Meta Conversion API (CAPI) a workaround that revolves around first-party data and server-side events for improved data collection and conversion tracking within the Meta ecosystem (Facebook and Instagram), not necessarily across all platforms.

How it works #

The Conversions API works by establishing a direct connection between your marketing data and Meta, meaning the data is sent directly from your servers to Facebook’s servers, bypassing the browser (client-side) entirely.

Meta Conversion API Workflow 1P Matching 1

Meta Conversion API workflow:

  1. Event Trigger: A specific user event occurs on your website or app (e.g., purchase, lead generation, page view).
  2. Data Collection: The Conversions API (CAPI) primarily relies on server-side code to collect relevant event data, while cookies are not the main focus.
    1. Server-side: collects relevant event data directly from your website’s backend systems, which includes:
      • user identifiers, like contact details (with user consent) or device information (anonymized when necessary),
      • and event details, like time, event type, item IDs, etc.
    2. First-party cookies: might be used in some cases, for identifying returning users, maintaining sessions, or store user preferences for data collection.
  3. Direct Transmission: The data is not stored on your server. After formatting and structuring according to Meta’s specifications, the server-side code sends it directly to Meta’s servers via a secure HTTPS call (API Call).
  4. Data Processing: Once gathered, Meta securely processes the event data, respecting user privacy. This includes:
    • Deduplication: It’s possible that both the Meta Pixel (client-side) and CAPI (server-side) report the same conversion event to Facebook. To avoid counting the same event twice, Facebook uses a deduplication process. This process involves comparing the data received from both sources and identifying duplicate events based on unique identifiers (like event IDs, user IDs, or transaction IDs).
    • Matching and attribution: This typically involves obtaining user identifiers on the client side (third-party cookies). It requires a user identifier (like a cookie ID or an anonymised user ID) from the client side to match the server-side events with the specific user’s activity on the Meta platforms (more details in the next paragraph).

      ⚠️ Note: Despite ad blockers potentially affecting the Meta Pixel’s ability to track user interactions and identifiers on the client side, if you can pass a consistent identifier through CAPI, Facebook can still match the server-side conversion event to the ad interaction.

Pros #

  • (A) Server-side tracking: By sending conversion data directly from your server to Meta’s servers, you bypass potential data discrepancies caused by browser limitations or ad blockers.
  • (B) Reduced reliance on cookies: Unlike the Pixel, which relies on third-party cookies for cross-site tracking, the API utilises server-side communication, making it less affected by cookie restrictions and user opt-outs.
  • (C) Offline event tracking: The server-side tracking is able to send events that happen outside of a web browser, such as CRM data, in-store sales and qualified leads (MQL/SQL).
  • (D) Privacy compliance: First-Party data collection is considered more privacy-compliant as it is collected with the explicit user’s consent and directly from interactions with the business’s website or app.

Cons #

  • (A) Complex Implementation: Setting up and configuring the API requires technical expertise or developer involvement.

    Unless facilitated by integration via parter integration (plugins or extensions).

  • (B) Costs: implementing and maintaining the API might involve indirect costs related to technical expertise, support, and data infrastructure (which involves servers, databases, and networking).

    Unless integration via parter integration: when integration is via partner integration (plugin or extension), these costs can be significantly reduced. In such cases, the need for technical skills is minimised because the plugin or extension often provides a ready-to-use solution. Additionally, server costs may be lowered or eliminated as this integration leverages the existing server infrastructure that runs your website platform.

  • (C) It’s not a replacement for third-party cookies: While CAPI utilises server-side conversions, it still relies on some client-side data collection for matching and attribution. Therefore, browser restrictions and privacy regulations can still impact its effectiveness to some degree.
  • (D) Ensuring compliance with privacy regulations: If the user has refused to transfer tracking data to Facebook (in Apple’s consent dialog or somehow else), we are also not allowed to do so. Specifically, we may not send any personal data or data that could be used to identify the user.

    ⚠️ Note: CAPI It’s a technological solution for an industry problem. It does NOT give you the authorization to ignore consumers’ desire to not be tracked if that’s their preference.

The dual approach #

Facebook recommends having the facebook pixel as your main tracking tool and Conversions API as a backup solution.

The Pixel and CAPI, working in tandem, offer a comprehensive view of user behaviour:

  • The Pixel is prioritised in capturing browser-level interactions, such as page views and clicks (including ad clicks) and more, but it cannot capture events happening outside the browser (server-side) or offline.

  • The CAPI does not track ad clicks, but it is specialises at recording server-side events, capturing both online and offline actions, including purchases which can occur across different devices.

The complementary role of CAPI #

Let’s clarify the process step by step, focusing on the role of the Meta Pixel and the Conversions API (CAPI) in tracking a user’s journey from clicking an ad to making a purchase:

  1. Ad Click Tracking (Client-Side with Meta Pixel):

    When a user clicks on a Facebook ad, the Meta Pixel on your website tracks this interaction. CAPI does not track ad clicks. This function is exclusively managed by the Meta Pixel.

    This clarifies a common misconception: The Conversions API (CAPI) is not used for tracking ad clicks. This function belongs entirely to the Meta Pixel

    The primary function of CAPI, as we will see next, is to track server-side events, specifically conversions or other significant actions that occur after the ad click, such as purchases or form submissions.

  2. Conversion Event Tracking (Server-Side with CAPI):

    When the user completes a purchase (a conversion event), this action is recorded on your server. Even though the Meta Pixel can track conversions client-side, there might be situations where tracking is blocked or restricted (due to browser settings, ad blockers, etc.). This is where CAPI comes in. You can use CAPI to send conversion events (like purchases) directly from your server to Facebook, ensuring that the conversion is recorded even if client-side tracking fails.

  3. Matching and Attribution:

    For attribution purposes, Facebook needs to match the conversion event (purchase) to the user’s ad interaction. This is where the client-side user identifier comes into play. Both the Meta Pixel and CAPI can pass user identifiers to Facebook. If the same user identifier is present in both the ad click event (tracked by the Pixel) and the purchase event (sent by CAPI), Facebook can attribute the conversion to the specific ad the user clicked.

    🚀At this point, it should be clear why CAPI does not entirely replace the Meta Pixel. Client-side tracking mechanisms like cookies are still involved in the process of matching and attribution. Therefore, CAPI plays a complementary role.

To summarise, the Meta Pixel tracks the user’s interactions on the website after clicking an ad, while CAPI ensures that server-side events like purchases are reliably reported to Facebook. Facebook then uses identifiers to match these events, attribute conversions to the correct ads, and deduplicate any duplicate events reported by both the Pixel and CAPI.

This integrated approach provides a comprehensive view of the conversion funnel, ensuring accurate attribution and measurement of ad performance.

Another Case:

Imagine a user browsing your online store, checking out a shirt (Meta process the browser event from the Pixel) and later completing the purchase physically in store (CAPI records the offline conversion). By working together, the Pixel paints the on-site journey, while CAPI captures the offline purchase.

This combined view lets you understand the full user behaviour.

FAQ #

Before we dive into the implementation of Pixel and CAPI, let’s address some common questions.

  1. Q: Is the Meta Pixel still useful?

    A: Yes, the Meta Pixel is still the main way you can track your Facebook Ads results and send key data to Facebook.

  2. Q: Can I use CAPI events without a Meta pixel on my site?

    A: You can’t use CAPI events without a Facebook Pixel.

    While CAPI doesn’t rely solely on browser cookies like the Pixel does, having a Pixel installed is actually one of the requirements for setting up CAPI.

  3. Q: What types of user data does the Conversions API (CAPI) utilise, and how are they categorised?

    A: When we’re talking about user data, we’re referring to the following attributes:

    Hashed Data (Anonymized) Non-Hashed Data
    Email IP address
    Phone Browser
    Gender Facebook click identifier
    Date of birth Facebook cookie identifier
    Last name Subscription identifier
    First name Lead identifier
    City Facebook login identifier
    State or province
    Postal code
    Country
    Custom identifier

    These are the types of user data that CAPI can process or handle.

  4. Q: Is there a risk of event duplication when using both Pixel and Conversions API (CAPI) at the same time?

    A: Yes, when using both Pixel and Conversions API, the same event is sent twice – once from each system.

    To prevent duplication, it’s essential that both the events (the Pixel event and the corresponding Conversions API event) have the same Event ID and event name. This allows Facebook/Meta to recognize them as a single event, thereby avoiding double-counting.

    ⚠️ Note: Meta process the browser event from Pixel when both systems report the same event. This means the browser event takes precedence and the CAPI event is essentially ignored (deduplicated) to avoid double-counting.

    Meta Deduplicated-Conversion API Event
  5. Q: Can I install the Meta Pixel with one tool and CAPI events with another tool?

    A: Even if technically possible, it’s impracticable and not recommended.

    The Pixel and CAPI must have the same event IDs for deduplication to work. Therefore, for ease of use, it’s recommended to implement both with the same tool.

    Common scenario is to have the Pixel implemented via Google Tag Manager, while you might consider implementing the Conversion API through a plugin or extension. In such a case, you can implement CAPI with Tag Manager , or alternatively, disable/pause the Pixel on GTM and implement both Pixel and CAPI using the plugin or extension.

    ⚠️ Note: If different tools are unavoidable, consider manual ID mapping (but proceed with caution).

  6. Q: What is the reduction in event loss after the implementation of Conversions API (CAPI)?

    A: From my observations, CAPI would result in approximately 5% of events lost, as opposed to client-side tracking only, where the event loss is around 30-40%.

    This means that, after implementing CAPI can be expected to reduce event loss by approximately 25-35%, resulting in improved campaign targeting, attribution, and ultimately a lower cost per conversion.

  7. Q: How to Implement Meta Pixel and Conversion API?

    A: There are multiple ways to set up Pixel & CAPI:

    • Partner Integrations
    • Server-Side Tagging
    • Tag Management Systems
    • Third-Party CAPI Providers

    The choice depends on your resources (technical and budget) as well as the level of customisation needed.

  8. Q: Did the conversion api save the data on the server before passing it to the meta server?

    A: No, Meta Conversions API doesn’t store data on your server before passing it to Meta’s servers.

    The data is sent directly to Meta, via a HTTPS call, without intermediate storage on your server.

    This method is designed for efficiency and to comply with privacy regulations by reducing data handling on the server side.

  9. Q: Why do I need a server to implement meta conversion api?

    A: Even if the data are sent directly to Meta, you still need a server for several crucial reasons:

    • The server acts as an intermediary to prep, filter, format and structure the data, making it compatible for Meta to process.
    • The server acts as a secure checkpoint to control access, protect sensitive information, and comply with privacy regulations.

    In essence, your server acts as a trusted “data steward” ensuring that the data is transmitted in line with both technical requirements and privacy standards.

    This trusted steward not only ensures compliance but also empowers you to track offline conversions, custom events, and enrich data with additional information from your CRM or other databases.

  10. Q: What is Event Match Quality and why is it different for various events?

    Meta Events Matching Score

    ⚠️ Note: As of August 2023, Facebook replaced the numerical Events Matching Score (1-10) with a four-tiered rating system: Poor, Okay, Good, and Great.

    A: The Events Match Quality is a metric (provided by Facebook Ads Manager) that measures how well the data from your website events can be matched to user profiles on Facebook.

    Events with more data about your customers will have a better matching score.

    • The PageView event usually has lower scores as offering minimal customer information (IP addresses or cookie IDs) beyond browsing activity customer information.
    • The Add to Cart event, while indicating potential purchase intent, still lacks specific user information.
    • Events like Purchase or Lead, often containing more customer data (name, email, address), so they tend to have higher rating.

    This is why there are different ratings for events.

Leave a Reply

Your email address will not be published.

Thanks for commenting