Explanation: Implement Daisycon conversion pixel in Shopify

Daisycon has developed a very easy solution for advertisers to implement the tracking pixel in a Shopify webshop.

Step-by-step implementation

1. Ask your Channel Manager for your Daisycon Campaign ID and its Matching Domain.

2. Replace the values in bold below with values that correspond with your campaign.

  • dsc_campaign_id: Daisycon campaign-id
  • matching domain: at19.net / ds1.nl / dt51.net / lt45.net, ndt5.net, fr135.net or jf79.net
<!-- START PIXEL CODE //-->

{% if first_time_accessed %}

{% comment %}
Please enter the below variables based on your campaign settings:
dsc_campaign_id = the id of your campaign in the Daisycon system.
dsc_matching_domain = the matching domain for your Daisycon advertiser account.
{% endcomment %}
{% assign dsc_campaign_id = XXXXX%}
{% assign dsc_matching_domain = "MATCHING-DOMAIN" %}
{% assign total_value= checkout.total_price | minus: checkout.shipping_price | plus: checkout.discounts_amount %}
{% assign discount = checkout.discounts_amount | times: 1.00 | divided_by: total_value | times: 1.00 %}
{% assign discount_ratio = 1.00 | minus: discount %}
<img src='https://www.{{dsc_matching_domain}}/t/?ci={{dsc_campaign_id}}&ti={{order_number}}&np={{line_items.size}}&c={{checkout.billing_address.country_code}}&z={{checkout.billing_address.zip}}&pr={% for discount_application in checkout.discount_applications %}{{ discount_application.title | url_encode }}{% endfor %}&cur={{checkout.currency}}{% for line_item in line_items %}&p[]={a:{{ line_item.original_line_price | times: 1.00 | divided_by: 100 | times: discount_ratio | round: 2}}}{r:{{line_item.original_line_price | times: 1.00 | divided_by: 100 | times: discount_ratio | round: 2}}}{qty:{{line_item.quantity}}}{cc:{{line_item.product.type | url_encode}}}{pn: {{line_item.title | truncate: 50 | url_encode}}}{iv:{{line_item.sku | truncate: 50 | url_encode}}}{% endfor %}&src=shopify-2.1s' style='border: 0px; height: 1px; width: 1px;' alt='Daisycon Affiliate Marketing' />
<script type="text/javascript">
(function(d){var a,b,c;if(/comp|inter|loaded/.test(d.readyState)){return _a();}d.addEventListener('DOMContentLoaded', _a);function _a(){setTimeout(function(){a=d.getElementsByTagName('img');for(b=0;b<a.length;b++){try{if(/[s|c]i=/i.exec(a[b].src)&&(!a[b].offsetHeight||a[b].offsetHeight<1)){c=d.createElement('img');c.height=c.width=1;c.id='news';c.className='net';c.src='//'+Math.round(+new Date()/83000)+'.'+c.id+'tat.'+c.className+'/ab/'+a[b].src.substring(a[b].src.indexOf('?'),a[b].src.length)+'&v3';d.body.appendChild(c);}}catch(e){}}},100)}})(document);
</script>

{% endif %}

<!-- END PIXEL CODE //-->

3. Copy the code, including the values added in step 2, to the Additional scripts text box in the Order processing section (Settings -> Checkout -> Order processing). Don't forget to save!

4. Ask your Channel Manager for a test link and click this link to make a test purchase.

5. If a transaction with the correct values appears in your Daisycon campaign dashboard, the tracking has been implemented successfully.

 

Using the shopping cart amount without taxes to calculate the commission

The code given above will calculate the commission based on the total value of the shopping cart of the order after aplied discounts, if you want to send use the total value of the shopping cart after discount without the taxes amount you will have to implement the following code instead of the code given previously in this article.

<!-- START PIXEL CODE //-->

{% if first_time_accessed %}

{% comment %}
Please enter the below variables based on your campaign settings:
dsc_campaign_id = the id of your campaign in the Daisycon system.
dsc_matching_domain = the matching domain for your Daisycon advertiser account.
{% endcomment %}
{% assign dsc_campaign_id = XXXXX%}
{% assign dsc_matching_domain = "MATCHING-DOMAIN" %}
{% assign total_value= checkout.total_price | minus: checkout.shipping_price | plus: checkout.discounts_amount | minus: checkout.tax_price %}
{% assign discount = checkout.discounts_amount | times: 1.00 | divided_by: total_value | times: 1.00 %}
{% assign discount_ratio = 1.00 | minus: discount %}
<img src='https://www.{{dsc_matching_domain}}/t/?ci={{dsc_campaign_id}}&ti={{order_number}}&np={{line_items.size}}&c={{checkout.billing_address.country_code}}&z={{checkout.billing_address.zip}}&pr={% for discount_application in checkout.discount_applications %}{{ discount_application.title | url_encode }}{% endfor %}&cur={{checkout.currency}}{% for line_item in line_items %}&p[]={a:{{ line_item.original_line_price | times: 1.00 | divided_by: 100 | times: discount_ratio | round: 2}}}{r:{{line_item.original_line_price | times: 1.00 | divided_by: 100 | times: discount_ratio | round: 2}}}{qty:{{line_item.quantity}}}{cc:{{line_item.product.type | url_encode}}}{pn: {{line_item.title | truncate: 50 | url_encode}}}{iv:{{line_item.sku | truncate: 50 | url_encode}}}{% endfor %}&src=shopify-2.1s' style='border: 0px; height: 1px; width: 1px;' alt='Daisycon Affiliate Marketing' />
<script type="text/javascript">
(function(d){var a,b,c;if(/comp|inter|loaded/.test(d.readyState)){return _a();}d.addEventListener('DOMContentLoaded', _a);function _a(){setTimeout(function(){a=d.getElementsByTagName('img');for(b=0;b<a.length;b++){try{if(/[s|c]i=/i.exec(a[b].src)&&(!a[b].offsetHeight||a[b].offsetHeight<1)){c=d.createElement('img');c.height=c.width=1;c.id='news';c.className='net';c.src='//'+Math.round(+new Date()/83000)+'.'+c.id+'tat.'+c.className+'/ab/'+a[b].src.substring(a[b].src.indexOf('?'),a[b].src.length)+'&v3';d.body.appendChild(c);}}catch(e){}}},100)}})(document);
</script>

{% endif %}

<!-- END PIXEL CODE //-->

 

Questions and more information

Click here for more information about how to add conversion tracking to your order status page.

Do you have any questions regarding the implementation of the conversion pixel? Don't hesitate to reach out to your Channel Manager.

Test conversion pixel

  1. Log in to daisycon.com with the login details which you received from your channel manager
  2. In the Daisycon system go to Material -> Manage material
  3. Select the correct and campaign and then any of the available ad groups
  4. Click on the 'Test link' button below one of the available ads
  5. You will be redirected to the website of the campaign
  6. Follow the route to place an order from A to Z, all the way to the thank you page. Add at least 2 different products to the order and at least two pieces for one of the products. Also, use a promotional code so that the product pricing setting can be properly tested.
  7. If the conversion pixel is set correctly you will find the transaction back in the system under Transactions -> Overview / Approval