Facebook pixel tracking

In this video, we take a look at using the Facebook tracking pixel to track your checkout and conversions.

Please note that the location of the ‘scripts’ area has moved to Customers > Tracking under your product settings as per this screenshot.

 

Basic tracking

To install a Facebook Pixel, you simply copy and paste the ‘Base Pixel code’ into the field in your product’s settings labelled ‘Paste tracking code to all of this product’s pages’.

 

Tracking events

If you want to track when a customer purchases your product, bump, upsells or downsells, this is also easy to do.

Once you have pasted the ‘Base Pixel code’ as above, you can use the following examples of tracking purchase events for the relevant parts of your customer’s orders.

If the customer purchases the main product field (to track the purchase of your main product).

<script>fbq('track', 'Purchase', {value: _thrive_order.order.product.total_readable, currency: _thrive_order.order.currency});</script>


If the customer purchases the bump field, to track the purchase of your bump offer.

<script>fbq('track', 'Purchase', {value: _thrive_order.order.bump.total_readable, currency: _thrive_order.order.currency});</script>


If the customer purchases this upsell field, to track the purchase of each one of your upsells.
Note! You must replace ‘UPSELL_ID_HERE’ in the code with the ID of your upsell, which is the number at the very end of the URL that you go to when editing the upsell.

<script>fbq('track', 'Purchase', {value: _thrive_order.order.upsells[UPSELL_ID_HERE].total_readable, currency: _thrive_order.order.currency});</script>


If the customer purchases this downsell field to track the purchase of each one of your downsells.
Note! You must replace ‘DOWNSELL_ID_HERE’ in the code with the ID of your downsell, which is the number at the very end of the URL that you go to when editing the downsell.

<script>fbq('track', 'Purchase', {value: _thrive_order.order.downsells[DOWNSELL_ID_HERE].total_readable, currency: _thrive_order.order.currency});</script>

 

An example

Here in this image, we can see in the first box I’ve pasted my base tracking pixel from Facebook. This pixel will be fired on all my checkout pages including the initial checkout, any upsell pages, and the success page (if using the ThriveCart success page). Then in the bottom box, I’ve pasted the purchase code from above. Now, when my customer purchases the main product it will trigger this purchase event to trigger when the customer arrives on the ThriveCart hosted success page. (If you’re using your own custom success page you will need to manage your codes separately).

Please note that the purchase events are only triggered when using ThriveCart’s hosted success page. As we control the scripts and content embedded on these pages.

If you are redirecting to your own custom success page, these codes will not be loaded consistently as your customers will often be redirected away before the codes have time to load.

If you are wanting to use purchase tracking events and your own success page you will need to embed these codes on your own page. ThriveCart provides details about your customer’s order via the query string, so it is possible to load specific scripts based on your customer’s purchases (if your funnel has multiple products). 

Related Articles