Implement Pricerunner tracking
Guide to implementing Pricerunner conversion tracking on your Shoporama online shop with proper Smarty code.
To track your sales in Pricerunner, you need to implement a conversion pixel on your order confirmation page. Here's a guide to doing it right on Shoporama so that Pricerunner gets the correct order value including shipping.
The code
Paste the following code in your thanks.html file in the theme (or wherever you keep your tracking collected). Replace [MERCHANTID] with your Pricerunner Merchant ID:
<{if $order && !$order->getTrackingCalled()}> <img width="1" height="1" style="display:none" src="https://www.pricerunner.dk/track/pixel/[MERCHANTID]?OrderTotalInclVat=<{$order->getTotalPrice()|number_format:2:".":""}>&OrderCurrencyISO=<{$webshop->getCurrency()}>" alt="" /> <{/if}>
What does the code do?
- {if $order && !$order->getTrackingCalled()} ensures that the pixel is only fired once per order. If the customer reloads the receipt page, the pixel is not sent again.
- $order->getTotalPrice() retrieves the total amount of the order including VAT AND including shipping. This is the value Pricerunner expects in the OrderTotalInclVat field.
- $webshop->getCurrency() retrieves the currency of the shop (e.g. DKK).
Important: Use getTotalPrice(), not getPrice(). getPrice() returns the order's item price including VAT, but WITHOUT shipping. Pricerunner needs the total order value incl. shipping in order to calculate correct commission and statistics.
Where do I find my Merchant ID?
You can find your Merchant ID in your Pricerunner dashboard under the integration or tracking settings. If you can't find it, contact Pricerunner directly.
Placement in the theme
The code is placed in the thanks.html file in your theme, or in the common tracking snippet included on the order confirmation page. The $order and $webshop variables are only available there.
Testing the pixel
- Create a test order in your shop and go to the receipt page.
- Open the browser's developer tools (F12) and look under the Network tab.
- Find the call to pricerunner.dk/track/pixel/... and check that OrderTotalInclVat matches the total amount including shipping.
- Confirm that the status is 200 OK.
Frequently asked questions
What is the difference between getPrice() and getTotalPrice()?
getPrice() returns the price of the items including VAT but without shipping. getTotalPrice() returns the total amount paid by the customer, including both VAT and shipping. Pricerunner expects the total amount.
Why do Pricerunner's figures differ from my own accounts?
The most common reasons are either using getPrice() instead of getTotalPrice(), returns that are not deducted at Pricerunner, or missing pixels at third-party checkout. Compare a test order in both systems.
Should the amount be with or without VAT?
The field is called OrderTotalInclVat, so it must be with VAT. getTotalPrice() always returns the amount including VAT.
Do refunds and exchanges count?
The pixel sends the order value at the time the customer completes the purchase. Subsequent refunds or partial returns must be handled in Pricerunner's system. Agree with Pricerunner how you want to report them.
What if I have multiple webshops or multiple languages?
Each shop and language version should typically have its own Merchant ID in Pricerunner. $webshop->getCurrency() automatically takes care of the currency, but you need to make sure that the correct Merchant ID is inserted for the shop in question.
How quickly does Pricerunner see my conversions?
The pixel is called as soon as the customer lands on the receipt page, but it can take up to 24 hours for the numbers to appear in the Pricerunner dashboard. Always test a test order and give it some time before debugging.
Do I need to consider GDPR and consent for the pixel?
Yes, you do. The Pricerunner pixel is a marketing cookie and requires consent from the customer before it can be loaded. Wrap the {if} block in an additional check on your cookie consent (e.g. $consent.marketing or a variable from your cookie banner solution) so that the pixel is only fired for customers who have said yes.
Can I use a server-side integration instead?
Yes, if Pricerunner offers it. Server-side tracking is more robust because it doesn't depend on the customer loading the receipt page. Learn more about server-side tracking and the Shoporama tracking engine.
If you need help with implementation, write to support@shoporama.dk.
Related articles
Implement tracking in a Shoporama theme
Developer guide to implement e-commerce tracking in a Shoporama theme with standard data layer, Google Tag Manager and custom events.
Tracking in your Shoporama webshop
Enable Shoporama's built-in tracking engine and send accurate tracking data to Facebook, Google Ads, GA4, TikTok and more - server-side and GDPR...
Shoporama Tracking Engine: Server-side tracking for all major platforms
Shoporama's tracking engine (developed with 1260 A/S) sends data from your webshop directly to Facebook, Google Ads, GA4, Pinterest, Snapchat,...
Server-side tracking in Shoporama
Complete guide to server-side tracking in Shoporama. Better data quality, fewer ad-blocker losses and faster pages, without compromising GDPR.
Google Analytics 4 (GA4) on your Shoporama online store
How to set up Google Analytics 4 on your Shoporama online store. Built-in GA4 integration with e-commerce events, server-side tracking and Consent...
Facebook Conversions API
Guide to setting up the Facebook Conversions API on your Shoporama online store via the built-in tracking engine.