Shopify Installation

To start collecting marketing and behavioral data in Northbeam, you’ll need to install a few scripts on your Shopify store.

Here's how each one works and where to install it.


🧠 Core Scripts Overview


SectionDescription
Northbeam Pixel + Metadata Script Installation

Learn how to install the Northbeam Pixel and Metadata Script inside your Shopify theme.liquid file.

These scripts are responsible for collecting visitor behavior, marketing attribution data, regional information, and other foundational tracking required for Northbeam to function properly.

Customer Event (firePurchaseEvent for Shopify)

Set up Shopify Customer Events to track completed purchases using Shopify’s native checkout_completed event.

This section walks through creating a custom pixel, adding the Northbeam event tracking script, configuring permissions, and ensuring customer consent settings are properly enabled.

Post Purchase Upsell (Optional)

Configure optional tracking for post-purchase upsell flows that occur after the standard Shopify checkout.

This is only required for stores using post-purchase checkout apps or upsell experiences and ensures those additional purchases are attributed correctly in Northbeam.




Where to find the scripts

All scripts can be found in: Settings → Northbeam Pixel and Event Tracking

Settings > Northbeam Pixel and Event Tracking > Shopify Pixel




Northbeam Pixel + Metadata Script Installation

These scripts must be added to the <head> section of theme.liquid.

Place the Metadata Script above the Northbeam Pixel.

Step by Step Guide

  1. In Shopify, go to Online Store → Themes
  2. Click ⋮ → Edit Code
  1. Open Layout → theme.liquid
  2. Paste the scripts inside the <head> section.
    1. The Metadata Script goes first, then the Northbeam Pixel.
  1. Click Save

Can I place the Northbeam Pixel and Metadata Script in Google Tag Manager?

The Base Pixel and Metadata scripts should only be installed directly in theme.liquid, not Google Tag Manager, per our normal setup. These scripts rely on Shopify-native variables and are not supported in Google Tag Manager or other third-party tagging tools.




Customer Event Installation

This script tracks completed purchases using Shopify’s checkout_completed event, or their native checkout.

Step by Step Guide

  1. In Shopify, go to Settings
  1. Navigate to Customer Events > Custom Pixels > Add Custom Pixel.
  1. Enter a name for the pixel (ex: Northbeam Event Tracking), then click Add Pixel
  1. Set Permission to Data collected does not qualify as data sale, paste in the script, then click Save.
  1. Click Connect
  1. Click Connect
  1. Go to your Customer Privacy settings and ensure a cookie consent banner is enabled.
🍪

Important: Without a cookie banner or consent solution, customers may not be able to opt in to tracking, which can prevent the script from firing. In most cases, this consent is managed through Shopify Customer Privacy settings.

Can I place the Customer Event in Google Tag Manager?

No. These scripts rely on Shopify-native variables that GTM and similar tools cannot access, and splitting them across environments can cause firing order issues and tracking inaccuracies.




Post Purchase Upsell Installation (Optional)

Only required if your Shopify store uses a post-purchase checkout or upsell flow.

Step by Step Guide

  1. Go to Settings → Checkout
  1. Scroll to Post-Purchase Pageand paste script into Additional Scripts
  1. Click Save