If you're running Facebook Ads traffic to your SamCart Product Pages, having insight into how your Ad dollars are working for you is critical to success. Thankfully, Facebook Ads Manager gives you all the tools you need to gauge Ad performance, and SamCart works seamlessly with these tools. 

The two main components are Facebook Pixels and Custom Conversion events. We'll discuss both below and break down how to get them working with your SamCart Marketplace. 

1. Embedding your Facebook Pixel(s)

The Facebook Pixel is code that you place on your SamCart Product Pages. It collects data that helps you track conversions from Facebook ads, optimize ads, build targeted audiences for future ads, and remarket to people who have already taken some kind of action on your page.

If you don't already have one, you'll need to setup a Pixel. 

To begin, head to your Facebook Events Manager. NOTE: This is the same whether you're using a Business Account or Personal Account for Facebook Ads.

Click the Set up Pixel button:

If you already have a Pixel, click the Set Up dropdown and select Install Pixel:

Choose the option to Manually add pixel code to website.

Copy the script located in the Install base code on website box:

Once you've copied it, head to General Marketplace Settings in your SamCart Dashboard and paste your script in the Embed HTML/Scripts in Header field. This field (along with everything else on this page) is global, meaning it applies to all your Product Pages. This saves you time installing the pixel on every separate Product Page! 

It should look something like this:

And you're done! Your Facebook Pixel is now installed on all of your SamCart Product Pages. 

It may take a few moments but the Facebook Events Manager will reflect the pixel as Active. That means you are all set! You will not need that pixel script again.

2. Creating a Custom Conversion Event Script in Facebook

You can use Custom Conversion Event Scripts to send detailed purchase data back to Facebook from SamCart. This helps you track exactly which SamCart purchases  are a result of your Ad(s). Facebook has detailed information about Custom Conversions here: https://www.facebook.com/business/help/780705975381000

For the examples here, we will use a common type of Custom Conversion called a Purchase Event. This sends data back to Facebook on the value of the purchase. First you'll need to decide what kind of script to use - Static or Dynamic

Static Purchase Events send a standard dollar value to Facebook. So, if the Product is $30, the Static Purchase Event will send that $30 total to Facebook. If the price may alter due to factors like Coupons, Quantity fields, or Shipping charges, you'll want to use a Dynamic Purchase Event. This passes along the price calculated at checkout, resulting in more accurate data.

To setup either type of Purchase Event, head to Facebook Events Manager and select Custom Conversions from the left menu. Then press the Create Custom Conversion button.

You'll be prompted with a screen to Create a Custom Conversion with a few fields:

Here are the fields you need to fill out: 

  1. The URL for the Purchase Event will be part of the URL from the Order Summary page a customer lands on after completing a purchase on the checkout page. You use this URL as this event should only fire if the customer makes a successful purchase. Here is the order summary URL you should use: https://MARKETPLACENAME.samcart.com/order_summary (Replace the MARKETPLACENAME portion with your SamCart Store URL.)
  2. Name the custom conversion so you can locate it easily later.
  3. For this example, we are choosing Purchase from the Category dropdown.
  4. If this is a Static Purchase Event, you will enter the Product Price. If this is a Dynamic Purchase Event, leave this field blank.

After you fill out the info and press the Create button, you will see the Purchase Event in the Custom Conversions section of your Facebook Events Manager: 

You are ready to move onto the next step! 

3. Installing a Custom Conversion Event Script in SamCart

Now that our event is created, we need to install it on our SamCart Product Pages. These steps will be different depending on whether you are using a Static Purchase Event or Dynamic Purchase Event

  • Static Purchase Event

If you are using a Static Purchase Event, head to the Advanced Settings tab of your Product and place the following script in the Fire pixels/scripts after an order is completed field and click Save Changes:

Here is the script to use: 

 fbq('track', 'Purchase', {
   value: 30.00,
   currency: 'USD',

Please note: both the Value and Currency should be changed to reflect the Product Price and Currency it is in. Do not add any dollar signs or other symbols to the value.

  • Dynamic Purchase Event

If you are using a Dynamic Purchase Event, head to the Advanced Settings tab of your Product and place the following script in the Fire pixels/scripts after an order is completed box. 

Here is the script to use: 

fbq('track', 'Purchase', {
 value: ##total_amount##,
 currency: 'USD',

Please note: the Currency should be changed to reflect the Currency used for your marketplace. Do not add any dollar signs or other symbols to the script.

4. Thank You Page Redirect

Whether you choose to direct your customer to the Order Summary or a Thank You Page URL after checkout could potentially impact your pixel and custom conversion, so keep it in mind during setup. 

There are two options within the Purchase Completion section of the General Marketplace Settings

The first option is Display Summary Page With Redirect Links. If you selected this option, an automatically generated Order Summary page will show up after a successful order. There are no additional steps to take to ensure the custom conversion fires. 

The second option is Redirect To Original Product Redirect URL. If you selected this option, an additional field will populate that says Fire Pixels Before Redirect (Optional). This toggle should be set to ON in order to successfully fire any custom conversions. 

5. Testing Tools

Now that you have set everything up, you will want to test everything! 

Please check out our article on Test Mode here to learn how to place an order without using a real credit card: https://intercom.help/samcart/en/articles/40128-test-mode

You can do this by running a Test Order on the Product with the conversion and using the following tools: 

Facebook Pixel Helper

Facebook Pixel Helper is an extension for the Chrome browser that helps you to see if the pixel is working properly. 

There are directions to install it on Facebook's support site here: https://www.facebook.com/business/help/1700857106877546

After installing Facebook Pixel Helper, you can go to your Product Page, and Preview it to verify the Pixel is reading. You will notice that the Page View is read, but there is a little yellow caution sign near the Purchase event. This is normal. The Purchase event will only fire if an order is completed, so while it is on the page, there are no actions firing (outside Page View) until the Submit Order button is pressed. 

After completing a Test Mode order, you will see the Facebook Pixel Helper reflects the Purchase Event data has been sent over: 

Test Mode

Another fantastic way to ensure everything is firing correctly is to Test Your Events in Real Time in your Facebook Events Manager. To use this tool, open up your SamCart Product Page in a separate tab, and the Pixel will start sending information to Facebook. You can place a Test Mode order on the page and see if there are any errors that populate as the events fire. 

Frequently Asked Questions

My pixel doesn’t work. 

Keep in mind, there is sometimes a delay for events reflecting in your Facebook dashboard. The best way to confirm where the issue is would be to use once of the testing tools. If you do not see the Pixel or Custom Conversion in the Facebook Pixel Helper tool, the coding may be missing or in an incorrect place. 

My pixel is working. Where is my data in the Facebook dashboard?

There is an Analytics option under the Analyze and Report section in the Facebook dashboard dropdown. This will contain the data from the Pixel and Custom Conversion events:

How does it work with an Order Bump or Upsell? 

If the Custom Conversions is setup on the product connected to the Order Bump or Upsell, you are good to go! Those Custom Conversions will only fire if the customer opts in.

This is complicated, do I need to set this up?

This is completely up to you. The bigger your business grows, the more products you add, the more this data could only help!

This article contains more information on why the data may be helpful to future marketing efforts: https://www.digitaland.tv/blog/what-is-tracking-pixel-ht/

Can you help me setup a Facebook ad? 

SamCart Support isn't authorized to make recommendations or offer support on Ad creation, Ad copy, Ad optimization, or Ad spend.

If you are looking for more in-depth training, please check out Brian Moran's course called Facebook Ads Academy. Facebook also offers additional training on their support site: https://www.facebook.com/business/learn

Can I send over more data from the Order Summary page to Facebook for tracking? 

If you'd like to pass even more information in your conversion event, add any of the following macros to your script in your Product's Fire pixels/scripts after an order is completed field, which is found under the Advanced Settings tab:


For example:

<script type="text/javascript">
    window.VWO = window.VWO || [];
    window.VWO.push(['track.revenueConversion', "997"]);

Can become: 

<script type="text/javascript">
    window.VWO = window.VWO || [];
    window.VWO.push(['track.revenueConversion', "##total_amount##"]);

Passing Order Information

If you want to get really advanced with tracking, you can tap into your customer's order information by exposing the javascript variable, 'order_summary' on the Order Summary Page.

That will expose the following info about each customer's order. This info can be used to pass back even more information with your tracking.

  "id": 41,
  "created_at": "2018-02-13 17:13:12",
  "total": "186.95",
  "shipping": "0.00",
  "tax": "0.00",
  "items": [
      "type": "product",
      "product_id": 11,
      "product_name": "Great Product",
      "amount": "37.00",
      "quantity": 1,
      "source": "primary"
      "type": "product",
      "product_id": 13,
      "product_name": "Amazing Product",
      "amount": "100.00",
      "quantity": 1,
      "source": "bump"
      "type": "product",
      "product_id": 17,
      "product_name": "Incredible Product",
      "amount": "49.95",
      "quantity": 1,
      "source": "upsell"
  "customer": {
    "first_name": "John",
    "last_name": "Doe",
    "email": "john@samcart.com",
    "phone": "4438675309"
  "billing_address": null,
  "shipping_address": {
    "address_line_1": "11850 West Market Place, Suite C",
    "address_line_2": null,
    "city": "Fulton",
    "region": "MD",
    "postal_code": "20759",
    "country": "USA"
  "custom_fields": [
      "name": "Shirt Color",
      "slug": "custom_ktJxqg9M",
      "value": "Midnight Blue"
      "name": "Shirt Size",
      "slug": "custom_StyspC0l",
      "value": "XL"
Did this answer your question?