*Note: When following these steps be sure to begin by referencing the instructions outlined in this article about setting up the pixel.


Step 1. Add the Link Tracking Pixel

  1. In your admin portal, navigate to: Sales Channel > Overview > Header meta tags

  2. Follow the instructions on Step 2 in the main article to embed the tracking pixel. You will copy/paste the code snippet to your store front so it tracks links on every page. Be sure to replace the ACCESS_TOKEN with your token.


Step 2. Integrate Order Tracking

  1. In your admin portal, navigate to: Settings > General > Analytics and Tracking > Custom tracking code on Order Confirmation page

  2. Follow the instructions on Step 3 in the main article to embed the order tracking script and replace the placeholders with code variables from the order object.

Here's an example of the Roster pixel with Ecwid order object variables set in the proper places.

<!-- Roster Order Submission: START -->
<script type="application/javascript">
<#noescape>
function submitOrder() {
if (WoolyAnalytics) {
var orderTotal = "${order.total}";
var cleanOrderTotal = orderTotal.replace(/\$/g,'');
var subTotal = "${order.subtotalWithoutTax}";
var cleanSubTotal = subTotal.replace(/\$/g,'');

WoolyAnalytics.set({
orderId: "${order.number}",
orderNumber: "${order.number}",
orderDate: "${order.dateCreated}",
discountCodes: ["${order.couponCode?js_string}"],
currency: "USD",
subtotalPrice: cleanSubTotal,
totalPrice: cleanOrderTotal,
firstName: "${customer.name?js_string}",
email: "${customer.email?js_string}"
});
WoolyAnalytics.emit();
}
}

var saScript = document.createElement("script");
saScript.addEventListener("load", submitOrder);
saScript.src = "https://sa.getroster.com/wooly-analytics.js?token=ACCESS_TOKEN";
document.body.appendChild(saScript);
</#noescape>
</script>
<!-- Roster Order Submission: END -->


Testing

Reference Step 4 in the main article to make sure you have everything setup.


Congrats, You're Done!!

You're all set up and your Ecwid store is now able to track referral links and discount codes within Roster.


Troubleshooting Tips

Did this answer your question?