Skip to main content
All CollectionsTracking Code Installation
Shopify Headless Installation Guide
Shopify Headless Installation Guide

How to install the ThoughtMetric tracking code on a headless Shopify store

Michael Signorella avatar
Written by Michael Signorella
Updated over a week ago

A headless Shopify store is one that has a custom built front end website that still uses the Shopify checkout system to handle payments and back end management. If you are running a regular Shopify store, see our installation guide for regular stores here:

It only takes a few minutes to install the ThoughtMetric tracking code on a headless Shopify store. There are two main steps. 1.) Install the ThoughtMetric tracking code on all the pages of your custom website. 2.) Install the ThoughtMetric revenue tracking code into the Shopify checkout page

1.) Install tracking code on your website

The first part of the installation is to install the ThoughtMetric tracking code on every page of your website. You will want to make sure you also install it on all of your landing pages as well.

a.) Make a ThoughtMetric account

The first step is to make a ThoughtMetric account by going to and signing up.

b.) Select the Shopify platform

Once you make an account you will be directed to an onboarding guide. Click on the Shopify button to view the installation instructions for that platform.

c.) Install ThoughtMetric App

Install the ThoughtMetric app on your Shopify store by entering your Shopify store URL and clicking "Install App". If you need help finding your store URL refer to the documentation here.

d.) Tracking code

The next step in the onboarding guide is to enable the ThoughtMetric tracking code in your Shopify theme. Since you are running a headless site and don't have a Shopify theme you will skip this step. Instead, scroll down in the onboarding instructions a bit and find the Tracking Code section. This is the ThoughtMetric tracking pixel that you will need to manually install into your headless site.

e.) Paste the code into the head of all of your custom website pages and landing pages.

Paste the tracking code into all of your custom website pages. If you are using any additional landing pages outside of your normal Shopify theme, make sure the ThoughtMetric tracking code is placed on those as well.

2.) Configure Revenue Tracking

These are the instructions for the standard Shopify checkout. If you are using checkout extensibility follow the instructions here.

a.) Open the Shopify admin page, Navigate to Settings -> Checkout

b.) Paste the revenue tracking code from ThoughtMetric into into both the Order Status Page and Post-purchase Page Additional Scripts text box

c.) Click Save

d.) Wait for ThoughtMetric to verify the installation

Go back to the ThoughtMetric onboarding step that you were on and scroll to the bottom of the page and click “Done”. This will bring you to the final step where ThoughtMetric will check the installation of the tracking code to make sure it has been installed correctly. Once ThoughtMetric detects that the tracking code is correctly installed you have finished the setup and can proceed to the ThoughtMetric dashboard. Note: for ThoughtMetric to detect that the system is working it listens for data coming for your website. So to speed up detection you can go to your website and refresh the page a few times to send data our way.

Did this answer your question?