Ecwid Order Confirmation Page
You use Ecwid for your store and want to track sales on your order confirmation page
Ayo AbdulLast Updated June 26, 2025
Use this method if you use Ecwid for your store and want to track sales on your order confirmation page.
Step 1: Tracking Clicks
Insert the following script in your website's <head>
tag to start tracking clicks:
Normal Method
<script
src="https://pushlapgrowth.com/affiliate-tracker.js"
data-affiliate
data-program-id="YOUR_AFFILIATE_PROGRAM_ID"
async>
</script>
Using Google Tag Manager
<script>
var pushLap = document.createElement('script');
pushLap.src = "https://pushlapgrowth.com/affiliate-tracker.js";
pushLap.setAttribute('data-affiliate', '');
pushLap.setAttribute('data-program-id', 'YOUR_AFFILIATE_PROGRAM_ID');
document.head.appendChild(pushLap);
</script>
Step 2: Tracking sign-ups and sales
Go to your Ecwid admin panel
Go to the Settings → General
Search for the widget Bootstrap Theme - Conversion Tracking Codes
Click Tracking and Analytics → Custom tracking code on Order Confirmation page
Add the following code to the Custom tracking code
Paste the following code:
<script>
<#noescape>
console.log("Window affiliate id: ", window.affiliateId);
const email = "${customer.email}";
const amount = "${order.total}";
const name = "${customer.name}";
const userId = "${customer.membershipId}";
if (!window.affiliateId) {
console.log("No affiliate ID found");
}
// Validate required parameters
if (!email || !amount) {
console.log("email and amount are required parameters");
}
if (window.affiliateId && email && amount) {
console.log("Creating Push Lap Sale: ", userId, amount, name, email);
fetch("https://www.pushlapgrowth.com/api/affiliates/capture-sale", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
userId,
amount,
name,
email,
affiliateId: window.affiliateId,
programId:
document
.querySelector("script[data-affiliate]")
?.getAttribute("data-program-id") ?? getQueryParam("programId"),
url: window.location.href,
}),
})
.then((response) => {
if (!response.ok) {
console.log("Failed to record sale");
}
console.log("Sale recorded: ", response.json());
})
.catch((error) => {
console.log("Error recording sale:", error);
});
}
</#noescape>
</script>
Did this answer your question?