Skip to main content

Conversion API (CAPI) Configuration for PrestaShop

Introduction

The Facebook Conversion API (CAPI) allows for server-to-server event tracking, ensuring that all key customer interactions on your PrestaShop store are captured accurately, even when browser tracking is limited. This guide explains how to configure the Pixel Plus module for PrestaShop to send events using the Conversion API.


Enabling the Conversion API

The first step in configuring the Conversion API (CAPI) is to enable it in the Pixel Plus module for PrestaShop.

  1. Navigate to the module settings in your PrestaShop back office.
  2. Locate the option "Enable Conversion API."
  3. Select "Yes" to activate CAPI.
  4. Save the configuration.

Note: If this option is disabled, no events will be sent through the Facebook Conversion API, and all tracking will rely solely on the browser-based Facebook Pixel.


Adding the Conversion API Access Token

How to Get the Facebook Access Token

To send events via CAPI, Facebook requires an Access Token. Follow these steps to obtain your token:

  1. Go to Facebook Business Manager: Log in to Facebook Business Manager.
  2. Open Events Manager: Navigate to the Events Manager section.
  3. Select Your Pixel: Choose the Pixel you want to configure.
  4. Go to Settings: Scroll down to the Conversions API section.
  5. Generate Access Token:
    • Click the "Generate Access Token" link.
    • Click once to generate the token.
    • Click again to copy the token.
  6. Paste the Token in PrestaShop:
    • Return to your PrestaShop back office.
    • In the Pixel Plus module, paste the Access Token in the corresponding field.
    • Save the configuration.

Important: If no access token is provided, Conversion API events will not be sent.


Test Code for Debugging

Facebook allows testing Conversion API events before going live. The test tool helps verify that events are properly configured.

How to Get the Facebook Test Code:

  1. Open Facebook Events Manager.
  2. Navigate to the "Test Events" section.
  3. Click "Test Code for Conversion API."
  4. Copy the generated Test Code.
  5. Paste the Test Code into the Pixel Plus module under the "Test Code" field.
  6. Save the configuration.

To disable test mode, leave the field empty.

Reminder: This code is only for testing purposes and should be removed before going live.


Advanced Matching Options

The Advanced Matching feature improves event tracking by helping Facebook accurately match user interactions. It helps prevent duplicate events when using both Facebook Pixel and Conversion API.

How It Works:

  • When enabled, Facebook Pixel and CAPI events are matched using additional hashed data.
  • This reduces duplicate event tracking and improves reporting accuracy.
  • Recommended for PrestaShop stores running multiple tracking setups.

Privacy Considerations:

  • If enabled, mention it in your Privacy Policy to comply with data regulations.

Choosing Data for Advanced Matching

The Pixel Plus module for PrestaShop allows you to specify which user data should be sent to Facebook for Advanced Matching.

Available Data Options:

User's Contact Data (Email, Phone)
User's Personal Data (Name, Last Name, Gender, Birthdate)
User's Address Data (City, State, Country, ZIP)

How to Configure in PrestaShop:

  1. In the Pixel Plus module settings, locate the "Advanced Options Data" section.
  2. Select the types of user data to send.
  3. Save the configuration.

Note: The module will only send available data. If the user is not logged in or has not entered certain details, those fields will not be sent.


Understanding Facebook's Scoring System

Facebook (Meta) uses a scoring system to measure the quality of received events. The Pixel Plus module for PrestaShop aims to achieve the best possible match quality.

  • Events unrelated to orders with a score of 4+ are already considered good.
  • Order-related events should have a score of 8 or higher.
  • Scores rarely exceed 9.5, even with optimal settings.

Conclusion

The Conversion API (CAPI) integration in the Pixel Plus module for PrestaShop ensures accurate event tracking, even when browser tracking fails. By configuring Advanced Matching, adding the Access Token, and using the Test Code, you can optimize your Facebook Ads performance and prevent duplicate events.

For more details, visit the official Facebook Conversion API Documentation.