Untitled

mail@pastecode.io avatar
unknown
liquid
a year ago
1.2 kB
8
Indexable
Never
{% capture pixel_src %}https://insight.adsrvr.org/track/pxl/?adv=4ocq9od&ct=0:ug6pqja&fmt=3&vf={{checkout.currency}}&orderid={{checkout.order_number}}&td1={% for line_item in checkout.line_items %}{{line_item.title | remove: '"' | replace: ' ', '_' }}{% unless forloop.last %}-{% endunless %}{% endfor %}&td2={% for line_item in checkout.line_items %}{{line_item.price | divided_by: 100.0}}{% unless forloop.last %}-{% endunless %}{% endfor %}&td3={% for line_item in checkout.line_items %}{{line_item.quantity}}{% unless forloop.last %}-{% endunless %}{% endfor %}&td4={% for line_item in checkout.line_items %}{{line_item.line_price | divided_by: 100.0}}{% unless forloop.last %}-{% endunless %}{% endfor %}&td5={{checkout.total_price | divided_by: 100.0 }}{% endcapture %}

<script>
  window.dataLayer = window.dataLayer || [];
  window.dataLayer.push({
    orderNumber: '{{ checkout.order_number }}',
    orderName: '{{ checkout.order_name }}',
    orderId: '{{ checkout.order_id }}',
    orderAmount: '{{ checkout.total_price | money_without_currency }}',
    orderCurrency: '{{ shop.currency }}',
    customerEmail: '{% if customer %}{{ customer.email }}{% endif %}',
    pixelSrc: '{{ pixel_src }}',
  });
</script>