Shopify Integration
Install Tapper on your Shopify store with the monitoring script in your theme and the Shopify snippet as a custom pixel.
Installing Tapper on a Shopify store takes two scripts. The Monitoring Script goes into your theme and analyzes visitor behavior on every storefront page. The Shopify snippet goes into a custom pixel and captures cart and checkout events — Shopify's checkout is sandboxed, so theme scripts never run there.
Both steps are required. Without the custom pixel, Tapper cannot see add-to-cart, checkout, and purchase events on your store.
Step 1: Add the Monitoring Script to Your Theme
In your Tapper dashboard, open the desired Protected Website and go to Website monitoring. Copy the Monitoring Script, then add it to your Shopify theme:
Open the Theme Code Editor
In your Shopify admin, go to Online Store → Themes, click the ⋯ button on your current theme, and select Edit code.
Open theme.liquid
In the file list, expand the Layout folder and open theme.liquid.
Paste the Script
Paste the copied monitoring script just before the closing </body> tag.
Save
Click Save. The script now runs on every storefront page.
Step 2: Add the Shopify Snippet as a Custom Pixel
In the same Website monitoring tab, scroll to the Ecommerce platform section, select the Shopify tab, and copy the snippet. It initializes Tapper with the ecommerce: "shopify-sandbox" parameter:
var script = document.createElement("script");
script.src = "https://monitor.tapper.ai/bundle.js";
script.async = true;
script.onload = function () {
window.tapper.init("YOUR_TRACKING_ID", { ecommerce: "shopify-sandbox", analytics: analytics });
};
document.head.appendChild(script);The snippet copied from your dashboard already contains your tracking ID. The analytics object is provided by Shopify's pixel sandbox — do not modify it.
What the Custom Pixel Captures
The pixel listens to Shopify's standard customer events and records the following, each with order value, currency, item count, and product IDs where available:
| Shopify event | Recorded as |
|---|---|
| Product viewed. | Product view. |
| Collection viewed. | Product list view. |
| Search submitted. | Search. |
| Product added to cart. | Add to cart. |
| Product removed from cart. | Remove from cart. |
| Cart viewed. | Cart view. |
| Checkout started. | Checkout started. |
| Payment info submitted. | Payment info added. |
| Checkout completed. | Purchase. |
No personal data is collected — no names, email addresses, or shipping details. Only the event type, order value, currency, and product identifiers are recorded. The pixel runs inside Shopify's isolated sandbox and does not modify your theme, Google Analytics, or any other tag on your store.
Add it to Shopify as a custom pixel:
Open Customer Events
In your Shopify admin, go to Settings → Customer events.
Add a Custom Pixel
Click Add custom pixel and name it Tapper.
Paste the Snippet
Paste the copied Shopify snippet into the code field.
Save and Connect
Click Save, then click Connect to activate the pixel.
Verify
Visit your store, add a product to the cart, and start a checkout. In your Tapper dashboard, confirm that visits and ecommerce events appear for the protected website.
Once both scripts are active, Tapper analyzes every storefront page and captures cart and checkout events across your Shopify store.