⚠️ NOTE: This integration method is not supported for merchants running in headless mode. If you are running in headless mode, use the integrated Mintegral Pixel Custom Site Integration.
This guide shows you how to add Mintegral Pixel to your Shopline store so Mintegral can track page views, product views, add-to-carts, checkouts and purchases.
Before You Start
Shopline store integration (Shopline billing)
For stores built entirely with Shopline's billing and checkout processes (without third-party checkout or payment applications), Mintegral Pixel can be fully integrated using Shopline's standard Pixel configuration.
Integration Steps
-
In your Shopline admin, select Settings .

-
Select Customer event .

-
Click Add a custom pixel code .

-
Enter Mintegral Pixel as the pixel name and click Save .

-
Copy the code in the Pixel Code section below, paste it into the Code field, and click Save .

-
Click Connect in the top-right corner.

-
A confirmation window appears. Click Connect again to confirm.

-
Check that the pixel's Status shows Connected .

Pixel Code
(function (w, d) { var u = "https://cdn-static.mintegral.com/sdk/pixel.js"; if (w.mintegralPixel) return; var s = (w.mintegralPixel = function () { s.performOperation ? s.performOperation.apply(s, arguments) : s.operationQueue.Push (arguments); }); S. operations Teue = []; Var f = d. getElementsByNagName ("script")[0], E = D.createElement("script"); e.async = !0; e.src = u; f.parentNode.insertBefore(e, f); })(window, document); mintegralPixel("init", { setupType: 3 }); analytics.subscribe("page_viewed", (event) => { const data = { url: event.data.url, title: event.data.title }; mintegralPixel("setPageContext", data); mintegralPixel("track", { type: "page_view", data }); }); analytics.subscribe("product_viewed", (event) => { const data = event.data; mintegralPixel("track", { type: "product_view", data: { currency: data.currency, value: data.price, items: [ { item_variant_id: data.skuId, item_id: data.spuId, item_name: data.title, price: data.price, quantity: 1 } ] } }); }); analytics.subscribe("product_added_to_cart", (event) => { const data = event.data; const items = data.list.map((item) => ({ item_variant_id: item.skuId, item_id: item.spuId, item_name: item.title, price: item.price, quantity: item.quantity })); mintegralPixel("track", { type: "product_add_to_cart", data: { currency: data.currency, value: items.reduce((sum, item) => sum + item.price * item.quantity, 0), items } }); }); analytics.subscribe("checkout_started", (event) => { const data = event.data; const items = data.list.map((item) => ({ item_variant_id: item.skuId, item_id: item.spuId, item_name: item.title, price: item.final_price, quantity: item.quantity, image_url: item.line_items_img })); mintegralPixel("track", { type: "begin_checkout", data: { currency: data?.checkout?.order?.currency_code ?? data?.currency, value: items.reduce((sum, item) => sum + item.price * item.quantity, 0), items } }); }); analytics.subscribe("checkout_completed", (event) => { const data = event.data; const items = data.list.map((item) => ({ item_variant_id: item.skuId, item_id: item.spuId, item_name: item.title, price: item.final_price, quantity: item.quantity, image_url: item.line_items_img })); mintegralPixel("track", { type: "purchase", data: { currency: data?.checkout?.order?.currency_code ?? data?.currency, value: items.reduce((sum, item) => sum + item.price * item.quantity, 0), items, transaction_id: data.orderSeq, shipping: data.checkout?.order?.shipping_price, tax: data.taxAmount } }); });
Events This Pixel Tracks
- Page viewed → page_view
- Product viewed → product_view
- Product added to cart → product_add_to_cart
- Checkout started → begin_checkout
- Checkout completed → purchase