Platforms
Case studies
Resources
About us
The purpose of this guide is to walk you through the correct way to implement the Preezie Analytics Pixel code on your website. To accomplish that there are two necessary steps to take:
Field definitions:
Property |
Type |
Description |
productId |
String |
The unique identifier of the product. Must be equal to the id sent to preezie via the import API |
productName |
String |
Name of the purchased product |
quantity |
Integer |
Quantity of the purchased product |
price |
Decimal |
Single item price |
From your Shopify admin, go to Settings > Checkout
Under Order Processing, go to the Additional Scripts text box
Copy and Paste the tracking code below. Replacing YOUR_PREEZIE_ID with your preezie ID
{% if first_time_accessed %}
!function (e, t, n, p, r, s) { e.prz || ((p = e.prz = function () { p.process ? p.process.apply(p, arguments) : p.queue.push(arguments) }).queue = [], p.t = +new Date, (r = t.createElement(n)).async = 1, r.src = "https://preeziecdn.azureedge.net/production/prz_pixel.min.js?t=" + 864e5 * Math.ceil(new Date / 864e5), (s = t.getElementsByTagName(n)[0]).parentNode.insertBefore(r, s)) }(window, document, "script"),
prz("init", "YOUR_PREEZIE_ID");
prz("event", "transaction", '{"products":[{% for line_item in checkout.line_items %} {"productId": "{{line_item.sku}}", "productName":"{{line_item.title}}", "quantity": {{line_item.quantity}}, "price": {{line_item.price}} }, {% endfor %} ]}');
{% endif %}
Platforms
About us