Shopify Custom Pixel

The TrueMetriks Shopify Custom Pixel tracks your pageviews, checkouts, and orders automatically. Here is how to set it up.

Video guide

How to install the TrueMetriks Custom Pixel on Shopify

Copy the pixel code from your dashboard

In your TrueMetriks dashboard, go to Settings > Tracking, pick the Shopify tab, and click Copy on the code block.

Showing setup for Shopify

Install on Shopify

Add a Custom Pixel in Shopify to start sending events from your store to TrueMetriks and every ad platform you have connected.

CUSTOM PIXEL CODE

HTML
// ===== Shopify Custom Pixel - TrueMetriks Analytics =====
// Auto-generated for yourstore.com
// Paste into: Shopify Admin > Settings > Customer events > Add custom pixel
// Customer Privacy: set to "Not required", then Save -> Connect

Shopify admin → Settings → Customer events → Add custom pixel. Paste the code above, then Save → Connect.

Settings → Tracking → Shopify - copy the code, paste it into Shopify

Open Settings in Shopify Admin

Log in to your Shopify Admin. At the bottom of the main left sidebar, click Settings.

shopify
  • Home
  • Orders 5
  • Products
  • Customers
  • Marketing
  • Discounts
  • Content
  • Markets
  • Finance
  • Analytics
Sales channels
  • Online Store
Apps
Settings
Shopify admin sidebar - click Settings at the bottom

Open Customer events

The Settings panel slides in from the left. Scroll down and click Customer events.

Your Organization

Organization

  • Organization
  • Users
YS

Your Store

yourstore.myshopify.com

  • General
  • Plan
  • Billing
  • Payments
  • Checkout
  • Customer accounts
  • Shipping and delivery
  • Taxes and duties
  • Apps
  • Domains
  • Customer events
  • Notifications
  • Languages
  • Customer privacy
Settings panel - click Customer events

Click Add custom pixel

At the top right of the Customer events page, click the dark Add custom pixel button.

Customer events

Pixels

App pixels Custom pixels
Pixels Status
TrueMetriks
Connected
Customer events - click Add custom pixel

Name it TrueMetriks

In the Add custom pixel dialog, type TrueMetriks in the Pixel name field, then click Add pixel.

Add custom pixel

Did you check available apps first? Apps are the most secure option, with automatic updates, for integrating with third-party services.
TrueMetriks 11/30

This is an advanced feature that requires JavaScript knowledge. Shopify is not responsible for your use of pixels.

Add custom pixel - name it TrueMetriks, then click Add pixel

Paste the code and Connect

You land on the pixel editor. Find the Code section near the bottom of the page and replace the default content with the code you copied from your TrueMetriks dashboard. Then click Connect in the top right.

TrueMetriks

Customer privacy

Permission
Data sale

Code

1// ===== Shopify Custom Pixel - TrueMetriks Analytics =====
2// Auto-generated for yourstore.com
3// Paste this entire block as-is
4(function () {
5  // ...
6})();
Pixel editor - paste the code, then click Connect

How to test

After connecting the pixel, the next step is verifying everything is firing correctly. See Test your integration for the full walkthrough.

Something not firing? See Troubleshooting.

Frequently asked questions

Where do I find the Custom Pixel code?

In your TrueMetriks dashboard at Settings > Tracking > Shopify. The code block has a Copy button and is generated for your specific store.

Do I need to install a Shopify app?

No. The Custom Pixel route does not require any Shopify App Store install. You paste the code directly into Shopify Admin under Settings > Customer events.

What should I set Customer Privacy to?

Set Permission to "Not required". The code in your dashboard works with this setting and sends events through your own first-party domain.

Does this work with all Shopify checkout flows?

Yes. The Custom Pixel runs across product pages, cart, checkout, and the post-purchase thank-you page.

How do I update the pixel later?

If we ship a code update, your dashboard will flag it on the Shopify tab. Copy the new code, open the existing pixel in Shopify Admin, replace the content of the Code section, then click Connect again.

Need help with this?

Reach us instantly on WhatsApp, or send us a message and we will get back to you. On workdays we usually respond in less than 24 hours.

or send us a message