Tracking Pixels 

Tracking Pixels are 1 x 1 pixel images which let you track the actions of your visitors on your website and measure the conversion.

How do they work? 

These tracking pixel images are generally included in the web page where you would like to track visitors. So, when a customer visits that particular page, when the page loads up, a request is made to your server to download the pixel, and then you know you've got a visitor.

Tracking pixels are generally used to track conversion. Conversion tracking pixels are usually added in the page where the actual conversion takes place. This would typically be Chargebee's Thank You page in this case.

How can they be used? 

Let's say you run an ad campaign on Facebook. You have the Facebook Conversion Tracking Pixel included in your Thank You Page (page which confirms the customer has made a purchase).

When a user clicks on the ad from Facebook and comes to your website, a cookie is generated in their browser which identifies the user. The user likes your product and decides to buy it.

After entering all the information and making a payment, they are redirected to the Thank You Page. This is where the Facebook conversion tracking pixel kicks in. A request is then sent to Facebook which verifies if the particular conversion has a cookie (which was set earlier to identify the user) linked to it.

Ad channels like Facebook, Google Adwords, etc. provide tracking pixel code snippets to be included in your website so you can track conversions and more such metrics for a customer.

Adding a Conversion Tracking Pixel in Chargebee 

Follow these steps to add a conversion tracking pixel in Chargebee:

Step 1: Copy the tracking pixel code from your provider where you will be hosting the ad.

Click here for resources from a few common providers.

Step 2: Enter the copied code in Chargebee.

To do this, in your Chargebee site click Settings > Configure Chargebee > Checkout & Self Serve portal > Tracking and Font Settings and paste the copied code in the Conversion Tracking Pixel Code field.

  • To provide multiple tracking pixel code snippets, leave a space between each code snippet.
  • If you're adding conversion tracking pixel for Facebook ( The Facebook Pixel ), you need to add the Facebook tracking pixel and the conversion script.

This Conversion Tracking Pixel Code field is available in the legacy Single Page Checkout v2. For the In-app Checkout v3, refer to the fields that are mentioned below:
Google Analytics
Google Tag Manager
Facebook Pixel

Variable Codes in Pixel Tracking 

Chargebee allows you to include sale related information to the conversion along with the tracking pixel. E.g. Using the merge tag "{{tracking_pixel_code.invoice_amount}}", you can track the real-time value of a conversion.

Click the Show Tracking Code Variables option available under the Conversion Tracking Pixel Code text box to view the different merge tags that you can add as part of your code.

The different merge tags are as shown:

Track Chargebee Checkout Events 

By enabling Facebook Pixel tracking, a set of events is fired during the checkout process.

With this tracking capability, you can gain insights into your customer's journey and optimize your conversion funnel accordingly.

Events passed to Facebook Pixel 

The following table provides a comprehensive list of these events, allowing you to monitor and analyze your customer's behavior and engagement at each step of the checkout process.

Event Action
Triggered When
InitiateCheckout When checkout pops up or loads.
Lead When a trial subscription is created.
Purchase When subscription with invoice created.
We pass the following parameters:
Invoice currency code as currency
Invoice total as value.

Track Custom Events 

To track custom events, you can use Chargebee.js. Learn more .

Tracking Code Resources 

General Tracking Pixel 
Adding Third Party codes 
Changing the currency 
Setting a value for the conversion 

Google Adwords

Setting up Tracking Pixels 
Tracking specific conversion values 


Setting Conversion Goals

 Setting up Tracking Pixels 

Was this article helpful?