Headless storefront? Use this guide too. Only step 1 is different. Pick the Headless storefront tab there. Steps 2 to 5 are the same, because checkout still runs on Shopify.
What you’ll set up
Before you start
- Connect Shopify to Northbeam. Step 3 needs it. If you haven’t yet, follow the Shopify Order Sync guide first.
- Open your scripts. Go to Settings → Northbeam Pixel and Event Tracking. Every script in this guide is there, already filled in with your Client ID:
1. Install the Northbeam Pixel and Metadata Script
These scripts run on every page of your storefront. The Northbeam Pixel records visits, where visitors came from, and the pages they view. The Metadata Script records your store’s region and currency. Where they go depends on your storefront:- Standard Shopify theme
- Headless storefront
1
Open your theme code
In Shopify, go to Online Store → Themes. Click ⋮ → Edit code.

2
Paste both scripts in the head
Open Layout → theme.liquid and find the 
<head> section. Paste the Metadata Script first, then the Northbeam Pixel directly below it.
3
Save
Click Save.
2. Set up the Northbeam Custom Pixel
Shopify’s checkout doesn’t run your theme, so the pixel from step 1 can’t see it. The Custom Pixel covers checkout instead. It records the checkout pages customers view and tracks completed purchases using Shopify’scheckout_completed event.
1
Add a custom pixel
In Shopify, go to Settings → Customer events. Open the Custom pixels tab and click Add custom pixel.

2
Name it
Name the pixel Northbeam Event Tracking, then click Add pixel.

3
Set permission and paste the script
Set Permission to Data collected does not qualify as data sale. Paste the firePurchaseEvent script from Northbeam into the code editor, then click Save.

4
Connect it
Click Connect, then click Connect again to confirm.



5
Check your cookie banner
Go to Settings → Customer privacy and confirm a cookie consent banner is turned on. Without one, customers can’t opt in to tracking, and the Custom Pixel may not run.

3. Set the Northbeam App Pixel to Always on
The App Pixel was added to Shopify automatically when you connected your store. You don’t need to create it or paste anything. Just change one setting.1
Find the Northbeam App Pixel
In Shopify, go to Settings → Customer events and open the App pixels tab. Click Northbeam.

2
Turn on Always on
Select Always on, then click Apply.

4. Add post-purchase tracking (optional)
Skip this step unless your store shows a post-purchase upsell page after checkout. This script lets Northbeam attribute those extra purchases.1
Open checkout settings
In Shopify, go to Settings → Checkout.

2
Paste the post-purchase script
Scroll to Post-purchase page. Paste the Northbeam post-purchase script into Additional scripts, then click Save.

5. Let Northbeam know
When your scripts are installed, submit a support ticket to tell our team. We’ll finish your setup so page views are tracked correctly.Test your setup
Check that you have:- The Metadata Script and Northbeam Pixel in the
<head>of your storefront, in that order (intheme.liquidfor standard themes) - The Northbeam Custom Pixel connected under Customer events → Custom pixels
- The Northbeam App Pixel set to Always on under Customer events → App pixels
- The post-purchase script in your checkout settings (only if you use a post-purchase upsell)
Optional tracking
Add these only if they apply to your store.Custom Goals
Track other actions, like sign-ups, add-to-carts, or form submissions.
Page View Events
Only for headless storefronts that are single-page apps (for example, Hydrogen). Most stores don’t need this.
FAQ
Why are there two Northbeam pixels in Shopify?
Why are there two Northbeam pixels in Shopify?
After setup, you’ll see two Northbeam entries under Settings → Customer events. This is expected. They’re not duplicates, and you need both.
Don’t delete either one.
What if I only see one Northbeam pixel?
What if I only see one Northbeam pixel?
Check both tabs under Settings → Customer events.
- Custom Pixel missing: complete step 2.
- App Pixel missing: connect your store using the Shopify Order Sync guide.
What if my checkout is on Shopify but my backend is custom?
What if my checkout is on Shopify but my backend is custom?
For example, an external order management system sends your orders to Northbeam through the Orders API instead of the Shopify connector. Follow this guide as normal, but change one line in the Custom Pixel. See Shopify + Custom.
Can I install Northbeam through Google Tag Manager?
Can I install Northbeam through Google Tag Manager?
Standard Shopify themes: no. Install the scripts directly in Shopify using the steps above.Headless storefronts: you can add the Northbeam Pixel to your storefront through Google Tag Manager (see the Headless tab in step 1). Steps 2 to 4 are always done in Shopify.