Integrate conversion tag from affiliate network to the additional script(settings>checkout)

tonucristian
New Member
1 0 0

Hi, i need to integrate Shopify with the affiliate network (paidonresults) and I do have a problem to integrate conversion tag to the SETTINGS>CHECKOUT>ADDITIONAL SCRIPT.

So I have to insert there the code :

{% capture purchases %}{% for line_item in line_items %}{{ line_item.product_id }},{{ line_item.line_price | money_without_currency }}{% unless forloop.last %}|{% endunless %}{% endfor %}{% endcapture %}

{% assign discounts = 0 %}
{% assign vouchercode = '' %}
{% if order.discounts.size > 0 %}
{% for discount in order.discounts %}
{% assign discounts = discounts | plus: discount.total_savings %}
{% assign vouchercode = discount.code %}
{% endfor %}
{% assign discounts = discounts | money_without_currency %}
{% endif %}

{% assign excludevat = 'YES' %}

{% capture string %}MerchantID=2306&SaleID={{ order_number }}&Purchases={{ purchases }}{% unless discounts == 0 %}&VoucherCode={{ vouchercode }}&OrderDiscount={{ discounts }}{% endunless %}&currency={{ currency }}&ExcludeVAT={{ excludevat }}{% endcapture %}

<script type="text/javascript" src="https://portgk.com/create-sale?client=java&{{ string }}"></script>
<noscript><img src="https://portgk.com/create-sale?client=img&{{ string }}" width="10" height="10" border="0"></noscript>

The problem is that there is a code already inserted from google tag, I tried to paste under and above the code from google tag, but is not working. Any ideas ?

0 Likes