Conversion Tracking Pixel Installation
...
Paste the below code into the box that appears.
Info |
---|
Make sure that you to replace the XXXXX in the code with your ShareASale Merchant ID. You can find this at the top-left of your ShareASale account when you are logged in. |
Info |
---|
Make sure to replace the !!!!!! in the code (scroll to the right) with your Master Tag ID. For merchants in the Setup Wizard, you can find this within Step 4 (Tracking Code Installation). For live merchants, you can find this by navigating to MY ACCOUNT > ACCOUNT DETAILS If you cannot locate your Master Tag ID, or would like to verify that you have one, please submit a ticket to our ShareASale support staff. |
Code Block | ||
---|---|---|
| ||
<script> fetch('/api/storefront/order/%%ORDER_ID%%', { credentials: 'include' }).then(function (response) { return response.json(); }).then(function (d) { var m = XXXXX, a = d.orderAmount - d.taxTotal - d.shippingCostTotal, t = '%%ORDER_ID%%', c = d.currency.code, s = [], p = [], q = [], v = [], o = new Image(); if (d.coupons.length > 0) { for (let i = 0; i < d.coupons.length; i++) { v.push(d.coupons[i].code) } } var l = d.lineItems.physicalItems, y = d.lineItems.digitalItems, u = 0, k = 0; for (let j = 0; j < l.length; j++) { u += l[j].quantity } for (let j = 0; j < y.length; j++) { u += y[j].quantity } for (let j = 0; j < d.coupons.length; j++) { k += d.coupons[j].discountedAmount }; for (let i = 0; i < l.length; i++) { s.push(l[i].sku); if (typeof l[i].discounts.coupon === 'undefined' && d.coupons.length > 0) { p.push((l[i].salePrice - (k / u)).toFixed(2)) } else if (typeof l[i].discounts.coupon !== 'undefined') { p.push((l[i].salePrice - (l[i].discounts.coupon / l[i].quantity)).toFixed(2)); } else { p.push(l[i].salePrice.toFixed(2)); } q.push(l[i].quantity); } for (let i = 0; i < y.length; i++) { s.push(y[i].sku); if (typeof y[i].discounts.coupon === 'undefined' && d.coupons.length > 0) { p.push((y[i].salePrice - (k / u)).toFixed(2)) } else if (typeof y[i].discounts.coupon !== 'undefined') { p.push((y[i].salePrice - y[i].discounts.coupon).toFixed(2)); } else { p.push(y[i].salePrice.toFixed(2)); } q.push(y[i].quantity); } o.src = "https://www.shareasale.com/sale.cfm?tracking=" + t + "&amount=" + a + "&merchantID=" + m + "&v=bigcommerce3.3&transtype=sale&skulist=" + s + "&pricelist=" + p + "&quantitylist=" + q + "&couponcode=" + v + "¤cy=" + c; o.id = "_SHRSL_img_1"; o.height = 1; o.width = 1; document.body.appendChild(o); var t = document.createElement('script'); t.src = 'https://www.dwin1.com/19038!!!!!.js'; document.body.appendChild(t) }); </script> |
...
Code Block |
---|
<script src=https://www.dwin1.com/!!!!!.js type="text/javascript" defer="defer"></script> |
Info |
---|
Where !!!!! is your Master Tag ID. Replace the !!!!!! in the code with your Master Tag ID. For merchants in the Setup Wizard, you can find this within Step 4 (Tracking Code Installation). For live merchants, you can find this by navigating to MY ACCOUNT > ACCOUNT DETAILS If you cannot locate your Master Tag ID, or would like to verify that you have one, please submit a ticket to our ShareASale support staff. |
...
If you were emailed a link to this document, a test link may have been provided to you. If it wasn’t, you can obtain one from your account by clicking here.
NOTE: If you do not click the test link your order will not track.
The test link should direct you to your own store. Once there, please purchase any item in your store. Sometimes Merchants will have a test item worth $1.00 sale price, but above $0.00 minimum.
...