Skip to main content
Add PostMetric to your Shopify store in minutes.

Installation

Step 1: Add the tracking script

  1. Go to your Shopify admin
  2. Navigate to Online Store → Themes
  3. Click Actions → Edit code
  4. Open theme.liquid in the Layout folder
  5. Add the tracking script before the closing </head> tag:
Replace YOUR_TRACKING_CODE with your tracking code from the dashboard.

Step 2: Verify installation

  1. Visit your Shopify store
  2. Check your PostMetric dashboard - you should see your visit

Track purchases

Track purchases on the thank you page. Add this to checkout.liquid or use the Order Status page:

Track add to cart

Track when items are added to cart. Add this to your cart template:

Next steps

Connect payment providers

Learn how to link revenue to your analytics