Post-Purchase Pixel Tracking on Shopify

Enhance your Shopify store's performance with our expert guide on post-purchase pixel tracking. Optimize conversions and gain valuable insights today!

Published at Published: 22.10.2021
Updated at Updated: 02.05.2025

Previously, there was simply no way to track the Upsells or similar activities on the Post-Purchase pages.

However, Shopify has recently introduced a new feature called Post-Purchase Pixel Tracking Pixels in 2021. It is just great news, especially for the stores that use up-sells.

Post-Purchase Additional Scripts

This is how Shopify Help Center explains:

If your store has installed an app that adds a post-purchase page to your store’s checkout, then any custom pixel tracking that you use on your store might not capture certain tracking events.
  • These script fields are primarily designed to capture upsells within the Shopify platform. However, it’s crucial to set them up carefully to avoid duplications.

  • The scripts in post-purchase tracking should be capable of recognizing events already captured, as the initial order is logged before the post-order page.

For instance:

Visitor purchases Product A for $10 (Order #1212) - This order is typically already captured with the existing tracking codes.

Visitor encounters an upsell on the post-purchase page and adds Product B. Their order now looks like: Products: Product A, Product B – Order #1212 – Revenue $20

Your scripts should ONLY send the additional product and additional revenue. If you send this order like a new order, then you will have many problems with your reports.

Shopify has anticipated potential complications with additional functions and scripts. They’ve introduced new liquid variables to facilitate seamless processing of interconnected scripts. This ensures that the new scripts can run in harmony with those on the order status page.

As a team, we’re currently in the testing phase and will share our results once we’re confident in the implementation.

Upsell Tracking on Shopify

Ensuring accurate purchase counts while avoiding duplicates is a critical task. To achieve this, employing tracking scripts on both the post-purchase and order status pages is key.

Meet the Liquid Variable: post_purchase_page_accessed

This variable acts as your guide:

  • If a customer lands on the post-purchase page and then moves to the order status page, post_purchase_page_accessed returns true.
  • If a customer doesn’t reach the post-purchase page, the variable returns false.

Here’s an example of how to use it:

Guidance from Shopify

The Shopify team offers a clear example (above) to illustrate the process. This script should operate on the final order status page, ensuring it only triggers if the user has accessed the post-purchase (or upsell) page.

While Shopify provides some sample code blocks for these pages, we’re refraining from sharing them until we’ve thoroughly tested them and can vouch for their effectiveness.

For more detailed information, please https://help.shopify.com/en/manual/promoting-marketing/analyze-marketing/pixel-tracking-post-purchase-page#compatibility-with-scripts-on-the-order-status-page&_ga="2".230446622.363140416.1694361656-1444183801.1688901558” rel=”nofollow noopener” target=”_blank”>visit the respective page.

Latest Posts

The latest news, technologies, and resources from our team.
View all posts
Blog Post Icon
Fixing Google Ads Cart Data Errors for Shopify Stores
Published at 12.05.2026
Published by Serhat Bora
Seeing cart data errors and warnings in Google Ads? Learn what each warning means and how to keep your conversion data clean and reliable.
Blog Post Icon
Shopify Post-Purchase Surveys: Improve Attribution with Zero-Party Data
Published at 29.04.2026
Published by Serhat Bora
Learn how Shopify post-purchase surveys capture zero-party data, reveal hidden channels, and complement your attribution tracking.
Blog Post Icon
Build Shopify Customer Segments That Work
Published at 28.04.2026
Published by Serhat Bora
Learn how to create, manage, and use customer segments in Shopify. Build useful segments that update automatically for your campaigns.
Blog Post Icon
Advanced Shopify Attribution: How to Track Full Customer Journey
Published at 21.04.2026
Published by Serhat Bora
Explore Shopify's default attribution system and see how you can get multi-touch attribution to see the full customer journey for every order.
Sign up for our newsletter
Be the first to know about releases and industry news and insights.
We care about your data in our privacy policy.
Take the first step towards reliable tracking Join 3,000+ merchants who trust their tracking with Analyzify.