Adding Tracking and Conversion Pixels

SPP comes with a dedicated Google Analytics integration which provides a reliable way to track your sales funnel and e-commerce metrics.

In this article you’ll learn how to set up other trackers including Facebook and Google Ads.

Let’s start with a quick overview first…

How tracking works

Most applications have one or two different tracking codes – a site-wide code that goes in the header of all your pages and a conversion code that should be loaded only when a conversion event happens.

Site-wide tracking code

To add any site-wide tracking scripts to your Client Portal’s header you can use the template editor in Settings > Templates.

From the left side open up your public/custom_scripts.html template. This is where you can paste the code that’s provided to you by the application.

Conversion tracking code

To track purchases you need to have a tracking code on the page that’s loaded after a successful payment. In SPP that is the clients/receipt.html template which is loaded at where ABCD is the invoice ID.

When editing this template put your code before the last {% endblock %} tag at the bottom of the page.

Some tracking codes can be customized with variables to pass the conversion value or transaction ID. See the Google Ads tracking code as an example of a conversion code that has values for transaction ID and amount.

Facebook tracking

Step 1. Add the main Facebook code to your public/custom_scripts.html template as seen here:

Step 2. Open up your clients/receipt.html template and change the false to true on line 4, that is – {% set fb_events = true %}

Step 3 (optional). If you want to track AddToCart and InitiateCheckout triggers, copy this code into your public/custom_scripts.html file.

Here’s a list of events that will get triggered:

Step 1. Add the main site tag code to your public/custom_scripts.html template as seen here:

Step 2. Copy and paste this code to your clients/receipt.html template.

Step 3. Update the code with your conversion ID.

Testing tracking pixels

Any ad blocker plugins you have installed in your browser may prevent the conversion pixel from firing. Be sure to turn them off while you’re testing your tracking codes.

You can use plugins like FB Pixel Helper and Google Tag Assistant to check your tags. Turn off live mode for your SPP and try placing a test order.

Updated 3 days ago

Thanks for your feedback 🙏

Was this helpful?