Facebook Pixel Tracking

Tracking Pixels are 1 x 1-pixel images which let you track the actions of your visitors on your website and measure the conversion. Follow the below steps to integrate facebook pixel tracking with Chargebee checkout (v3 version).

Step 1: Create Pixel in Facebook

  • Log in to your business account on Facebook and navigate to the Pixel tab under Event Manager
  • Click Create a Pixel
  • Fill in information about the pixel and click Create
  • In the pop-up window that follows, choose the option Manually Install Code Yourself

The subsequent screen will give you the code you need to integrate with your business website.

Step 2: Enable Facebook Pixel on your website pages.

Here’s how it’s done:

  • Locate the header section (head tags) in your website pages.
  • Copy the pixel code from Facebook and paste it within the header section in your website pages.

Step 3: Whitelist your domain in Chargebee

  • Go to Setting → Configure Chargebee -→ Checkout & Self Serve Portal → Advanced Settings
  • Add your site domain in the whitelisted domains section

Step 4: Enable Facebook Pixel in Chargebee Checkout

Enable Facebook Pixel in checkout based on your integration mode.

Drop-in Checkout Integration

If you have integrated checkout using Drop-in Script mode, then include the data-cb-fbq-enabled="true" attribute in the included header script.

<script src="https://js.chargebee.com/v2/chargebee.js" data-cb-site="your-site"   


If you have integrated checkout using API mode, then while initializing Chargebee instance, pass the enableFBQTracking parameter with value as true

$( document ).ready(function() {
  var chargebeeInstance = Chargebee.init({
    site: "your-site",
    enableFBQTracking: true