Wix integration
Create a free website with Wix.com. Choose a stunning template and customize anything with the Wix website builder—no coding skills needed.
This integration describes how to integrate the Wix store. If you are using Ecwid or PayPal buttons within Wix please use the methods for those solutions.
Customize store thank you page
Log in to your Wix dashboard and edit your site. Once the Editor loads on the left side menu click the My Store button, then go to Store Pages and open the Thank You Page.
When the Thank You Page is loaded click Add button on the left side menu and under More select Embeds and from there add the HTML iframe element to your thank you page.
Now on the top bar of the editor find Dev Mode and click the button to Turn on Dev Mode. With the Dev Mode enabled click the Thank You Page Page Code bar which has appeared at the bottom of the screen.
Replace the code in this section with the one below where you need to replace the #thankYouPage1 and #html1 with the IDs of your own elements as shown on the below screenshot.
$w.onReady(function () {
$w('#thankYouPage1').getOrder()
.then((order) => {
$w('#html1').postMessage(order);
})
.catch((error) => {
});
});
Per order tracking code
Still on the thank you page editor enter the following code into the HTML element which you had added to your page:
<script id="pap_x2s6df8d" src="https://URL_TO_PostAffiliatePro/scripts/trackjs.js" type="text/javascript"></script>
<script type="text/javascript">
window.onmessage = (event) => {
if (event.data) {
var orderObject = event.data;
var totalCost = 0;
var productIds = [];
for (i = 0; i < orderObject.lineItems.length; i++) {
totalCost += orderObject.lineItems[i].totalPrice - orderObject.lineItems[i].discount;
if (orderObject.lineItems[i].taxIncludedInPrice === true) {
totalCost -= orderObject.lineItems[i].tax;
}
if (orderObject.lineItems[i].sku != undefined) {
productIds.push(orderObject.lineItems[i].sku);
} else {
productIds.push(orderObject.lineItems[i].productId);
} }
PostAffTracker.setAccountId('Account_ID'); var sale = PostAffTracker.createSale();
sale.setTotalCost(totalCost);
sale.setOrderID(orderObject.number);
sale.setCurrency(orderObject.currency);
sale.setProductID(productIds);
if (orderObject.discount !== undefined && orderObject.discount !== null && orderObject.discount.appliedCoupon !== undefined && orderObject.discount.appliedCoupon !== null) {
sale.setCoupon(orderObject.discount.appliedCoupon.code);
}
PostAffTracker.register();
}
}
</script>
If you wish to track the customer’s email address, phone or name you can use variables orderObject.buyerInfo.email, orderObject.buyerInfo.phone, orderObject.buyerInfo.firstName, orderObject.buyerInfo.lastName.
Have a look at Wix documentation to see an example of the whole orderObject.
Once you have the codes added Publish the page.
Per product tracking code
Still on the thank you page editor enter the following code into the HTML element which you had added to your page:
<script id="pap_x2s6df8d" src="https://URL_TO_PostAffiliatePro/scripts/trackjs.js" type="text/javascript"></script>
<script type="text/javascript">
window.onmessage = (event) => {
if (event.data) {
var orderObject = event.data;
PostAffTracker.setAccountId('Account_ID');
for (i = 0; i < orderObject.lineItems.length; i++) {
totalCost = orderObject.lineItems[i].totalPrice - orderObject.lineItems[i].discount;
if (orderObject.lineItems[i].taxIncludedInPrice === true) {
totalCost -= orderObject.lineItems[i].tax;
}
if (orderObject.lineItems[i].sku != undefined) {
productId = orderObject.lineItems[i].sku;
} else {
productId = orderObject.lineItems[i].productId;
}
var sale = PostAffTracker.createSale();
sale.setTotalCost(totalCost);
sale.setOrderID(orderObject.number + '(' + i + ')');
sale.setCurrency(orderObject.currency);
sale.setProductID(productId);
if (orderObject.discount !== undefined && orderObject.discount !== null && orderObject.discount.appliedCoupon !== undefined && orderObject.discount.appliedCoupon !== null) {
sale.setCoupon(orderObject.discount.appliedCoupon.code);
}
if (i < orderObject.lineItems.length -1) {
sale.doNotDeleteCookies();
}
}
PostAffTracker.register();
}
}
</script>
If you wish to track the customer’s email address, phone or name you can use variables orderObject.buyerInfo.email, orderObject.buyerInfo.phone, orderObject.buyerInfo.firstName, orderObject.buyerInfo.lastName.
Have a look at Wix documentation to see an example of the whole orderObject.
Once you have the codes added Publish the page.
Add the click tracking code
The last step is to add the click tracking code to all pages of your Wix website. To do that navigate to your Wix dashboard and then to Settings> Custom code.
On the screen which opens paste the code which you can get in your Post Affiliate Pro merchant panel under Tools> Integration> Clicks tracking and have it added to Body – end and loaded on All pages once.
Explore seamless integrations with Post Affiliate Pro to enhance your affiliate marketing strategies. Discover solutions for e-commerce, email marketing, payments, and more, with easy integrations for platforms like 1&1 E-Shop, 2Checkout, Abicart, and many others. Optimize your affiliate network with these powerful tools.
Effortlessly integrate Post Affiliate Pro with your Weebly site using our step-by-step guide. Leverage Weebly's drag-and-drop builder combined with advanced affiliate tracking to enhance your marketing strategy. Secure, seamless setup ensures efficient monitoring and analysis of your sales and commissions. Visit now to optimize your affiliate management!
Effortlessly integrate your e-commerce site with Post Affiliate Pro and boost your affiliate program's success. Our expert team ensures seamless integration with your payment processor, handling technical issues along the way. Enjoy a free trial and free integration service, saving you time and maximizing your ROI. Join now and experience top-notch affiliate management with over 500 integration options.