Track Conversions with Poltio SDK
Step 1: Basic Setup
To start tracking conversions, include the following code in all your product detail pages and checkout success pages:
<!-- Poltio Tag -->
<script>
(function(t,e,p,i,n){if(!(t.poltio&&t.poltio.push))
{t.poltio={queue:[],push:function(s,r,u){t.poltio.queue.push([s,r,u])}};
var o=e.createElement("script");o.id="poltiosdk",
o.async=!0,o.src=p+"/"+i+"?p="+n+"&r="+encodeURIComponent(t.location.href),
e.head.appendChild(o)}})(window,document,
"https://sdk.poltio.com","poltio.js","PoltioID");
</script>
<!-- End Poltio Tag -->
<head>
section of your pageYou MUST replace PoltioID with your Poltio Account ID which you can find in the bottom left section of Poltio Panel.

Once you've added this code, configure your checkout success URL in the Poltio Platform.

Step 2: Measuring Cart Totals
To track the cart value, add the following snippet to your checkout page using Google Tag Manager or directly in your code.
fbq
with window.poltio.push
.Example code for tracking cart totals:
<script>
window.poltio.push('track', 'Purchase', {currency: "USD", value: 30.00});
</script>
<head>
section of your page<!-- Poltio Tag -->
<script>
(function(t,e,p,i,n){if(!(t.poltio&&t.poltio.push))
{t.poltio={queue:[],push:function(s,r,u){t.poltio.queue.push([s,r,u])}};
var o=e.createElement("script");o.id="poltiosdk",
o.async=!0,o.src=p+"/"+i+"?p="+n+"&r="+encodeURIComponent(t.location.href),
e.head.appendChild(o)}})(window,document,
"https://sdk.poltio.com","poltio.js","PoltioID");
</script>
<!-- End Poltio Tag -->
You MUST replace PoltioID with your Poltio Account ID which you can find in the bottom left section of Poltio Panel.

Step 2a: Detailed Tracking with Items
For more detailed tracking, you can send product details (SKUs) using the window.poltio.push('track')
function. Here's an example:
<script>
window.poltio.push('track', 'Purchase', {
value: 4.99,
poltio_account_id: PoltioID,
contents: [
{ id: 'testProduct1', quantity: 1, value: 2.99 },
{ id: 'testProduct2', quantity: 2, value: 1.0 },
],
currency: 'USD',
order_id: 'testOrder1',
});
</script>
If you are using Google Tag Manager to include Poltio Tag and Poltio Conversion Tracking code, make sure Poltio Tag trigger has higher priority in order to make sure it loads before Conversion Tracking code to prevent race conditions.

Parameters:
value
: (Required) The total monetary value of the purchase.poltio_account_id
: (Required) A unique identifier of your Poltio account.contents
: (Optional) An array of objects containing product details:id
: Product identifier.quantity
: Quantity of the product.value
: Monetary value of the product.
currency
: (Optional) The currency of the transaction.order_id
: (Optional) A unique identifier for the order.
Your Poltio account's unique identifier is the Account ID in the menu at Poltio Platform.
Custom Domain
For comprehensive tracking across all platforms, including mobile and environments with stricter privacy settings, configure a custom domain. This allows you to use first-party cookies by setting up a subdomain of your primary site.
Visit the Custom Domain Documentation to learn how to set up a custom domain.
After setting up a custom domain, replace the script URL in your pages with the following:
<!-- Poltio Tag -->
<script>
(function(t,e,p,i,n){if(!(t.poltio&&t.poltio.push))
{t.poltio={queue:[],push:function(s,r,u){t.poltio.queue.push([s,r,u])}};
var o=e.createElement("script");o.id="poltiosdk",
o.async=!0,o.src=p+"/"+i+"?p="+n+"&r="+encodeURIComponent(t.location.href),
e.head.appendChild(o)}})(window,document,
"https://poltio.yourdomain.com","poltio.js","PoltioID");
</script>
<!-- End Poltio Tag -->
You MUST replace PoltioID with your Poltio Account ID which you can find in the bottom left section of Poltio Panel.

By following these steps, you can easily track user interactions and conversions on your website using the Poltio SDK.