Guides and articles » Integrations » Implementation of Hello Retail tracking

Implementation of Hello Retail tracking


With this code you can activate Hello Retail sales tracking in your online shop.

Please note that additions via javascript are at your own risk and there is no guarantee that a "code snippet/plugin" like this will continue to work after the platform receives updates and extensions in the future.

1. Hello Retail Javascript

Firstly, you need to insert your"Hello Retail JavaScript" code that you find in your Hello Retail Dashboard.

The code must be inserted in the <head>. Find the option to insert your own codes in <head> by searching for "html" in the administration.

2. Tracking codes

Next, you need to insert the following code on your receipt page. Find the option to insert your own codes on the receipt page by searching for "html" in the administration.

<span class="addwish-conversion" style="display:none;"
data-ordernumber="[ordernumber]"
data-total="[orderamount]"
data-email="[customer-email]">
</span>

<script>
window.addEventListener('_saas_site_event', function(event){
	var detail = event.detail;
	if(detail.type === 'order_complete')
	{
		for(let i=0; i<detail.items.length;i++)
		{
			document.body.innerHTML += '<span class="addwish-product" data-url="'+detail.items[i].url+'" data-productnumber="'+detail.items[i].item_number+'" data-quantity="'+detail.items[i].quantity+'"></span>';
		}
		ADDWISH_PARTNER_NS.api.reload();
	}
});
</script>