When implementing Pixeleze, you'll need to place a piece of JavaScript code on every page of your website.
The code should be placed in the HEAD tag of each page.
<script>
function Pixeleze(pixelezeData)
{
var url = "https://pixeleze.com/run?PixelezeData=" + encodeURIComponent(JSON.stringify(pixelezeData));
url += "&SourceUrl=" + encodeURIComponent(window.location.href);
url += "&Cookies=" + encodeURIComponent(document.cookie.replace(/(\s|^)(?!Pixeleze).+?=.+?(;|$)/g, ""));
var ref = document.getElementsByTagName("script")[0];
var js = document.createElement("script");
js.src = url;
js.async = true;
ref.parentNode.insertBefore(js, ref);
}
var pixelezeData = pixelezeData || {};
pixelezeData.AccountId = "00000000-0000-0000-0000-000000000000";
Pixeleze(pixelezeData);
</script>
<script>
function Pixeleze(pixelezeData)
{
var url = "https://pixeleze.com/run?PixelezeData=" + encodeURIComponent(JSON.stringify(pixelezeData));
url += "&SourceUrl=" + encodeURIComponent(window.location.href);
url += "&Cookies=" + encodeURIComponent(document.cookie.replace(/(\s|^)(?!Pixeleze).+?=.+?(;|$)/g, ""));
var ref = document.getElementsByTagName("script")[0];
var js = document.createElement("script");
js.src = url;
js.async = true;
ref.parentNode.insertBefore(js, ref);
}
var pixelezeData = pixelezeData || {};
pixelezeData.AccountId = "00000000-0000-0000-0000-000000000000";
pixelezeData.OrderId = "1234";
pixelezeData.OrderTotal = 19.99;
pixelezeData.PromoCode = "PROMO";
pixelezeData.Discount = 10.50;
pixelezeData.Products = [
{
ProductId: "1",
ProductName: "Product 1",
ProductPrice: 19.99,
ProductQuantity: 2,
ProductCategory: "misc",
},
{
ProductId: "2",
ProductName: "Product 2",
ProductPrice: 600,
ProductQuantity: 1,
ProductCategory: "misc",
},
];
Pixeleze(pixelezeData);
</script>