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 https://username.spp.io/receipt/ABCD 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 uncomment the ‘Facebook purchase event’ code.

Step 3 (optional). If you want to track AddToCart and InitiateCheckout triggers, you can use the code below:

https://bitbucket.org/chris_willow/workspace/snippets/gnbbkL

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:

https://bitbucket.org/chris_willow/workspace/snippets/qnMMy5/spp-google-ads-conversion-event

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 over a month ago

Thanks for your feedback 🙏

Was this helpful?