Set up Daisycon tracking on your webshop
Guide to implementing Daisycon conversion tracking on your Shoporama webshop with correct Smarty code.
If you use Daisycon affiliate marketing, you must implement a tracking pixel on your order confirmation page. Here is a guide to customizing Daisycon's code for Shoporama.
Implementation
The code must be inserted into ` thanks.html ` in your theme. You’ll need a developer to do this.
Daisycon provides you with code containing placeholders such as [amount], [transaction_id], etc. These must be replaced with Smarty variables:
| Daisycon variable | Shoporama Smarty Code |
|---|---|
| [amount] | <{math equation=x*0.8 x=$order->getPrice()}> |
| [transaction_id] | <{$order->getWebshopOrderId()}> |
| [revenue] | <{math equation=x*0.8 x=$order->getPrice()}> |
| [description] | <{$order->getWebshopOrderId()}> |
The finished code (wrapped in a Smarty if block so it only runs on purchase, and only once per order):
<{if $order && !$order->getTrackingCalled()}>
<{math assign="daisycon_amount" equation=x*0.8 x=$order->getPrice()}>
<img src="https://jdt8.net/t/?ci=DIN_CAMPAIGN_ID&a=<{$daisycon_amount}>&ti=<{$order->getWebshopOrderId()}>&r=<{$daisycon_amount}>&pn=<{$order->getWebshopOrderId()}>"
style="border:0; height:1px; width:1px;" alt="" />
<{/if}>
Note
Replace DIN_CAMPAIGN_ID with your Daisycon campaign ID. The factor 0.8 in the calculation subtracts sales tax, since getPrice() returns the price of the items including sales tax but excluding shipping. Adjust as needed.
Only one conversion per order
The check !$order->getTrackingCalled() ensures that the pixel is fired only once per order. If the customer reloads the receipt page, the conversion is not sent to Daisycon again. Without this check, you risk the same order being registered multiple times with Daisycon.
The flag is set by the theme’s built-in tracking code once it has sent its own purchase events. If your theme does not use Shoporama’s built-in tracking code, you must mark the order yourself by adding <{$order->setTrackingCalled()}> as the last line immediately before <{/if}>. Otherwise, the check will have no effect.
Need help? Contact us at support@shoporama.dk.
Related articles
Implement Pricerunner tracking
Guide to implementing Pricerunner conversion tracking on your Shoporama online shop with proper Smarty code.
Implement tracking in a Shoporama theme
Developer Guide to E-commerce Tracking in a Shoporama Theme: Data Layer, Google Tag Manager, Custom Events, and Correct Product IDs Using...
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...