---
title: How to migrate from the Shopify app to the Server-side hybrid Universal Integration
description: migrate from Shopify to hybrid universal server-side
---

[Skip to content](https://knowledge.profitmetrics.io/how-to-migrate-from-the-shopify-app-to-the-universal-server-side-integration#main-content)

[![ProfitMetrics logo black version](https://knowledge.profitmetrics.io/hs-fs/hubfs/pm_logotype_blue.png?width=193&height=28&name=pm_logotype_blue.png)](https://knowledge.profitmetrics.io/?hsLang=en)

Open main navigation

Close main navigation

- [Contact Support](https://knowledge.profitmetrics.io/kb-ticket/new)

[Contact Support](https://knowledge.profitmetrics.io/kb-ticket/new?hsLang=en)

 How can we help you?

- There are no suggestions because the search field is empty.

1. [Knowledge base](https://knowledge.profitmetrics.io/?hsLang=en)
2. [Shopify](https://knowledge.profitmetrics.io/shopify?hsLang=en)

# How to migrate from the Shopify app to the Server-side hybrid Universal Integration

## Move your order flow off the standard Shopify app when you need control over what is sent to ProfitMetrics — and when. This guide walks through moving an existing store from the ProfitMetrics Shopify app to the Universal Server-side Integration. You'll build your own order flow, replace the app's browser tracking with a custom pixel, and retire the app.

### When the Universal Integration is the better fit

The [ProfitMetrics Shopify app](https://knowledge.profitmetrics.io/how-to-install-the-profitmetrics-app-in-shopify?hsLang=en) is the right choice for most stores: it installs in minutes and sends orders automatically. The Universal Server-side Integration is for stores that need control over the order data. Because you build the flow yourself, you can correct, enrich, or delay each order before it reaches ProfitMetrics.

| Scenario | How the Universal Integration helps |
| --- | --- |
| **Volume-based shipping charges** — a light product in a very large box is charged by size, not weight, so weight-based shipping cost rules understate the real cost | Send the actual shipping cost with each order using the `shippingCostExVat` override |
| **Costs known only after processing** — a third party handles the shipment before the final cost is confirmed, and the Shopify app can't wait | Hold the order in your own system and send it once the final numbers are in |
| **Custom data requirements** — the order needs values the app doesn't provide | Set exact cost prices, packaging and handling costs, or the final gross profit directly on each order |

The Universal Integration is a hybrid: your server sends the orders, while a small script in the browser handles visitor tracking, consent, and email capture. Both parts are needed — without the browser side, attribution and features like Conversion Booster stop working.

---

### Migration at a glance

The order of these steps matters. The Shopify app keeps running until the new setup is verified, so your profit data stays complete throughout.

1. [Build your server-side order flow.](https://knowledge.profitmetrics.io/how-to-migrate-from-the-shopify-app-to-the-universal-server-side-integration#buid-server-side-order-flow)
2. [Install the ProfitMetrics consolidated custom pixel in Shopify.](https://knowledge.profitmetrics.io/how-to-migrate-from-the-shopify-app-to-the-universal-server-side-integration#install-custom-pixel)
3. [Send a test order and have it verified.](https://knowledge.profitmetrics.io/how-to-migrate-from-the-shopify-app-to-the-universal-server-side-integration#send-test-order)
4. [Build and install your product feed](https://knowledge.profitmetrics.io/how-to-migrate-from-the-shopify-app-to-the-universal-server-side-integration#add-product-feed)
5. [Remove the Shopify app.](https://knowledge.profitmetrics.io/how-to-migrate-from-the-shopify-app-to-the-universal-server-side-integration#remove-shopify-app)
6. [Switch the website type to Custom.](https://knowledge.profitmetrics.io/how-to-migrate-from-the-shopify-app-to-the-universal-server-side-integration#switch-to-custom)
7. [Add your billing details.](https://knowledge.profitmetrics.io/how-to-migrate-from-the-shopify-app-to-the-universal-server-side-integration#add-billing)

---

### Step 1: Build the server-side order flow

Your flow sends each order to ProfitMetrics as a URL-encoded GET request to `https://my.profitmetrics.io/l.php`. There are two ways to build it:

**Option 1: Use Make.com.** Follow [Send orders to ProfitMetrics using Make.com — any e-commerce platform](https://knowledge.profitmetrics.io/send-orders-using-make-any-e-commerce-platform?hsLang=en). Make watches for new Shopify orders, transforms them into the ProfitMetrics format, and sends them — nothing to host or deploy. Because the trigger filters on order status, you can hold each order until it reaches the status where its costs are final. Using 3rd party tools may incur additional fees

**Option 2: Build it yourself.** Follow Part 1 of [How to set up a full server-side hybrid Universal Integration](https://knowledge.profitmetrics.io/how-to-setup-serverside-hybrid-universal-integration?hsLang=en). It documents the full order format, including the cost overrides, and is the route for an ERP, a fulfilment platform, or code you host.

Whichever option you choose, two parts of the order format matter most for the scenarios above:

- **Cost overrides** — set `overrides.shippingCostExVat` to send the actual shipping cost of the order. Matching override fields exist for payment cost, extra costs such as packaging, and gross profit.
- **Timing is yours** — nothing requires the order to be sent the moment it is placed. If the final cost arrives from a third party later, wait for it. Do send each order after the customer has passed the order confirmation page, where the pixel identifies them — five minutes after purchase is a safe rule of thumb.

Skip Part 2 of the full server-side guide. The Universal Integration script it describes is replaced on Shopify by the consolidated custom pixel in the next step.

---

### Step 2: Install the custom pixel

The Shopify app's theme embed currently loads ProfitMetrics in the browser. The consolidated custom pixel takes over that job: it loads the tracking script across the storefront and checkout, keeps ProfitMetrics in sync with the customer's consent choices through Shopify's Customer Privacy API, and captures the customer's email during checkout for identification and Conversion Booster.

1. In your Shopify admin, go to **Settings** \> **Customer events**.
2. Click **Add custom pixel** (code provided below) and name it `ProfitMetrics Universal`.
3. Under **Customer privacy**, set **Permission** to **Not required**. The pixel manages consent itself — it reads the customer's choices and passes them to ProfitMetrics.
4. Paste the full pixel code below into the code editor.
5. Replace `PUBLIC_ID_HERE` with the Public ID of your website in ProfitMetrics.
6. Leave `PM_COOKIE_DOMAIN` empty unless ProfitMetrics support has told you otherwise.
7. Click **Save**, then **Connect** to activate the pixel.

```
// ProfitMetrics – Consolidated Universal Custom Pixel (v1)// Configurationconst PM_PUBLIC_ID = 'PUBLIC_ID_HERE';const PM_COOKIE_DOMAIN = '';const PM_EMAIL_SELECTORS = ['#newsletter_text-footer','input[name="contact[email]"]','#customer_email','#CustomerEmail','#email','input[name="customer[email]"]','#RegisterForm-email','#RecoverEmail','input[type="email"][name="email"]','[data-cf-field-type="email"] input[type="email"]',].join(', ');// Consent statelet cc_statistics = init.customerPrivacy?.analyticsProcessingAllowed ?? false;let cc_marketing = init.customerPrivacy?.marketingAllowed ?? false;// Email statelet pmEmail = '';// Script load guardlet pmScriptLoaded = false;// Core: load bundle.js (once)function pmLoadScript() {window.profitMetrics = {pid: PM_PUBLIC_ID,cookieStatisticsConsent: cc_statistics,cookieMarketingConsent: cc_marketing,emailInputSelector: PM_EMAIL_SELECTORS,cookieDomain: PM_COOKIE_DOMAIN,onLoad: () => {pmTrySetEmail();},};if (pmScriptLoaded) {if (typeof profitMetrics !== 'undefined') {profitMetrics.cookieStatisticsConsent = cc_statistics;profitMetrics.cookieMarketingConsent = cc_marketing;pmTrySetEmail();}return;}pmScriptLoaded = true;const script = document.createElement('script');script.src = `https://cdn1.profitmetrics.io/${PM_PUBLIC_ID}/bundle.js`;script.defer = true;script.onerror = () => {console.error('ProfitMetrics: Failed to load bundle.js – will retry on next event');pmScriptLoaded = false; // allow one retry};document.head.appendChild(script);}// Email helperfunction pmTrySetEmail() {if (!pmEmail) return;if (!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(pmEmail)) return;if (typeof profitMetrics !== 'undefined' && typeof profitMetrics.setEmail === 'function') {profitMetrics.setEmail(pmEmail);}}// Consent: Customer Privacy APIapi.customerPrivacy.subscribe('visitorConsentCollected', (event) => {cc_statistics = event.customerPrivacy?.analyticsProcessingAllowed ?? cc_statistics;cc_marketing = event.customerPrivacy?.marketingAllowed ?? cc_marketing;pmLoadScript();});// Storefront eventsanalytics.subscribe('page_viewed', () => {pmLoadScript();});analytics.subscribe('product_viewed', () => {pmLoadScript();});analytics.subscribe('collection_viewed', () => {pmLoadScript();});analytics.subscribe('search_submitted', () => {pmLoadScript();});analytics.subscribe('cart_viewed', () => {pmLoadScript();});analytics.subscribe('product_added_to_cart', () => {pmLoadScript();});// Checkout funnelanalytics.subscribe('checkout_started', (event) => {const email = event.data?.checkout?.email;if (email) pmEmail = email;pmLoadScript();});analytics.subscribe('checkout_contact_info_submitted', (event) => {const email = event.data?.checkout?.email;if (email) {pmEmail = email;pmTrySetEmail();}pmLoadScript();});analytics.subscribe('checkout_address_info_submitted', (event) => {const email = event.data?.checkout?.email;if (email) {pmEmail = email;pmTrySetEmail();}pmLoadScript();});analytics.subscribe('checkout_shipping_info_submitted', (event) => {const email = event.data?.checkout?.email;if (email) {pmEmail = email;pmTrySetEmail();}pmLoadScript();});analytics.subscribe('payment_info_submitted', () => {pmLoadScript();});analytics.subscribe('checkout_completed', (event) => {const email = event.data?.checkout?.email;if (email) {pmEmail = email;pmTrySetEmail();}cc_statistics = init.customerPrivacy?.analyticsProcessingAllowed ?? cc_statistics;cc_marketing = init.customerPrivacy?.marketingAllowed ?? cc_marketing;pmLoadScript();});// End ProfitMetrics Consolidated Universal Pixel
```

 

*Note: `PM_EMAIL_SELECTORS` covers the email fields used by common Shopify themes, including newsletter and account forms. If your theme uses a custom email field, add its CSS selector to the list.*

---

### Step 3: Add a product feed

ProfitMetrics reads your product cost prices from a product feed. Without it, orders arrive but there are no cost prices to calculate gross profit against.

The product feed is automatically enabled when using the original Shopify app integration, so this needs to be replaced when uninstalling the ProfitMetrics app. Follow [How to create a product feed for ProfitMetrics](https://knowledge.profitmetrics.io/how-to-create-a-product-feed-for-profitmetrics?hsLang=en) to build one — an XML feed, largely compatible with the Google Shopping feed, listing each sellable product variant with its ID, retail price, and cost price.

The product ID in the feed is how ProfitMetrics ties a tracked event or an order back to a product's cost, so it has to match the item ID used everywhere else:

- The IDs collected on your storefront by the ProfitMetrics browser conversion actions, which now load from the custom pixel.
- The IDs sent with each order by your server-side flow.

On Shopify, use the long internal Shopify product ID as the item ID in all three places — the feed, the browser conversion actions, and the order. If these don't match, ProfitMetrics can't connect an order or a tracked event to the product's cost price, and profit figures will be wrong.

---

### Step 4: Send a test order and have it verified

Keep the Shopify app installed, place a test order, and let your new flow send it to ProfitMetrics. Then contact [support@profitmetrics.io](mailto:support@profitmetrics.io) — we'll confirm the order has been received correctly and that tracking data has been applied to it.

Don't remove the Shopify app before this confirmation. The app is still your live order source, and removing it early leaves a hole in your profit data.

---

### Step 5: Remove the Shopify app

Once your test order is confirmed, uninstall the app. In your Shopify admin, go to **Settings** \> **Apps and sales channels**, open **ProfitMetrics** and click **Uninstall** — the normal Shopify app deletion process. This removes the app's order sync and its theme app embed together, and it ends the app subscription billed through Shopify.

---

### Step 6: Switch the website type to Custom

Your site is currently registered in ProfitMetrics as a Shopify website, and it now needs to be a Custom one so ProfitMetrics stops expecting data from the app. Let us know once the app is removed — reply on the thread from your test-order check, or email [support@profitmetrics.io](mailto:support@profitmetrics.io) — and we'll change the website type for you.

---

### Step 7: Add your billing details

Uninstalling the app ended your subscription through Shopify, so billing moves to ProfitMetrics directly. Follow [How to add a credit card to your account](https://knowledge.profitmetrics.io/how-to-add-a-credit-card-to-your-account?hsLang=en) to add your payment details and keep your account running without interruption.

 

Still stuck? Contact us at [support@profitmetrics.io](mailto:support@profitmetrics.io) and we'll help you get set up.

- [Getting Started](https://knowledge.profitmetrics.io/getting-started?hsLang=en#main-content)

    - [Learn the Basics](https://knowledge.profitmetrics.io/getting-started?hsLang=en#learn-the-basics)
    - [Prepare for Onboarding](https://knowledge.profitmetrics.io/getting-started?hsLang=en#prepare-for-onboarding)
    - [Account Setup](https://knowledge.profitmetrics.io/getting-started?hsLang=en#account-setup)
- [E-commerce Platforms](https://knowledge.profitmetrics.io/e-commerce-platforms?hsLang=en#main-content)

    - [Shopify](https://knowledge.profitmetrics.io/e-commerce-platforms?hsLang=en#shopify)
    - [WooCommerce](https://knowledge.profitmetrics.io/e-commerce-platforms?hsLang=en#woocommerce)
    - [Magento](https://knowledge.profitmetrics.io/e-commerce-platforms?hsLang=en#magento)
    - [PrestaShop](https://knowledge.profitmetrics.io/e-commerce-platforms?hsLang=en#prestashop)
    - [BigCommerce](https://knowledge.profitmetrics.io/e-commerce-platforms?hsLang=en#bigcommerce)
    - [Shopware](https://knowledge.profitmetrics.io/e-commerce-platforms?hsLang=en#shopware)
    - [DanDomain & Related](https://knowledge.profitmetrics.io/e-commerce-platforms?hsLang=en#dandomain-related)
    - [Universal Integration (Clientside)](https://knowledge.profitmetrics.io/e-commerce-platforms?hsLang=en#universal-integration-clientside)
    - [Universal Integration (Server-side Hybrid)](https://knowledge.profitmetrics.io/e-commerce-platforms?hsLang=en#universal-integration-server-side-hybrid)
    - [Other Platforms](https://knowledge.profitmetrics.io/e-commerce-platforms?hsLang=en#other-platforms)
    - [Developer Documentation](https://knowledge.profitmetrics.io/e-commerce-platforms?hsLang=en#developer-documentation)
- [Ad Channels](https://knowledge.profitmetrics.io/ad-channels?hsLang=en#main-content)

    - [Google Ads](https://knowledge.profitmetrics.io/ad-channels?hsLang=en#google-ads)
    - [Meta (Facebook/Instagram)](https://knowledge.profitmetrics.io/ad-channels?hsLang=en#meta-facebook-instagram)
    - [Microsoft Bing Ads](https://knowledge.profitmetrics.io/ad-channels?hsLang=en#microsoft-bing-ads)
    - [Google Analytics 4](https://knowledge.profitmetrics.io/ad-channels?hsLang=en#google-analytics-4)
    - [Partner-ads](https://knowledge.profitmetrics.io/ad-channels?hsLang=en#partner-ads)
    - [Other Channel Configuration](https://knowledge.profitmetrics.io/ad-channels?hsLang=en#other-channel-configuration)
- [Tracking & Conversion Setup](https://knowledge.profitmetrics.io/tracking-conversion-setup?hsLang=en#main-content)

    - [Overview](https://knowledge.profitmetrics.io/tracking-conversion-setup?hsLang=en#overview)
    - [Conversion Booster for Google Ads](https://knowledge.profitmetrics.io/tracking-conversion-setup?hsLang=en#conversion-booster-for-google-ads)
    - [Conversion Booster for Meta](https://knowledge.profitmetrics.io/tracking-conversion-setup?hsLang=en#conversion-booster-for-meta)
    - [Conversion Booster Custom Pixels](https://knowledge.profitmetrics.io/tracking-conversion-setup?hsLang=en#conversion-booster-custom-pixels)
    - [Enhanced Conversions](https://knowledge.profitmetrics.io/tracking-conversion-setup?hsLang=en#enhanced-conversions)
- [Shopping Booster](https://knowledge.profitmetrics.io/shopping-booster?hsLang=en#main-content)

    - [Overview & Setup](https://knowledge.profitmetrics.io/shopping-booster?hsLang=en#overview-setup)
    - [Supplemental Feeds](https://knowledge.profitmetrics.io/shopping-booster?hsLang=en#supplemental-feeds)
    - [Campaigns & Labels](https://knowledge.profitmetrics.io/shopping-booster?hsLang=en#campaigns-labels)
    - [Troubleshooting](https://knowledge.profitmetrics.io/shopping-booster?hsLang=en#troubleshooting)
- [Product Feed & Costs](https://knowledge.profitmetrics.io/product-feed-costs?hsLang=en#main-content)

    - [Product Feed](https://knowledge.profitmetrics.io/product-feed-costs?hsLang=en#product-feed)
    - [Shipping & Payment Costs](https://knowledge.profitmetrics.io/product-feed-costs?hsLang=en#shipping-payment-costs)
    - [Expenses](https://knowledge.profitmetrics.io/product-feed-costs?hsLang=en#expenses)
- [Dashboard, Orders & Reporting](https://knowledge.profitmetrics.io/dashboard-orders-reporting?hsLang=en#main-content)

    - [Dashboard & Orders](https://knowledge.profitmetrics.io/dashboard-orders-reporting?hsLang=en#dashboard-orders)
    - [Looker Studio](https://knowledge.profitmetrics.io/dashboard-orders-reporting?hsLang=en#looker-studio)
    - [Google BigQuery](https://knowledge.profitmetrics.io/dashboard-orders-reporting?hsLang=en#google-bigquery)
- [Account & Billing](https://knowledge.profitmetrics.io/account-billing?hsLang=en#main-content)

    - [Users & Access](https://knowledge.profitmetrics.io/account-billing?hsLang=en#users-access)
    - [Billing & Invoices](https://knowledge.profitmetrics.io/account-billing?hsLang=en#billing-invoices)
- [Privacy & Consent](https://knowledge.profitmetrics.io/privacy-consent?hsLang=en#main-content)

    - [GDPR](https://knowledge.profitmetrics.io/privacy-consent?hsLang=en#gdpr)
    - [Consent Management Platforms](https://knowledge.profitmetrics.io/privacy-consent?hsLang=en#consent-management-platforms)
    - [Google Consent Mode](https://knowledge.profitmetrics.io/privacy-consent?hsLang=en#google-consent-mode)
- [For Agencies](https://knowledge.profitmetrics.io/for-agencies?hsLang=en#main-content)

    - [Getting Started as an Agency](https://knowledge.profitmetrics.io/for-agencies?hsLang=en#getting-started-as-an-agency)
    - [Agency Certification](https://knowledge.profitmetrics.io/for-agencies?hsLang=en#agency-certification)
- [Shopify](https://knowledge.profitmetrics.io/shopify?hsLang=en)
- [PrestaShop](https://knowledge.profitmetrics.io/prestashop?hsLang=en)
- [Google Ads](https://knowledge.profitmetrics.io/google-ads?hsLang=en)
- [Meta (Facebook / Instagram)](https://knowledge.profitmetrics.io/meta-facebook-instagram?hsLang=en)
- [Uncategorized](https://knowledge.profitmetrics.io/uncategorized?hsLang=en)
- [Billing](https://knowledge.profitmetrics.io/billing?hsLang=en)
- [Google Sheets](https://knowledge.profitmetrics.io/google-sheets?hsLang=en)
- [Account](https://knowledge.profitmetrics.io/account?hsLang=en)
- [Ideal Shop](https://knowledge.profitmetrics.io/ideal-shop?hsLang=en)

[![ProfitMetrics logo black version](https://knowledge.profitmetrics.io/hs-fs/hubfs/pm_logotype_blue.png?width=193&height=28&name=pm_logotype_blue.png "ProfitMetrics logo black version")](https://profitmetrics.io)

<https://www.facebook.com/ProfitMetrics/> <https://podcasts.apple.com/> [mailto:support@profitmetrics.io](mailto:support@profitmetrics.io)

Copyright © 2026, ProfitMetrics ApS