Next Commerce
Tracking

Test and troubleshoot tracking

Place a test order on your campaign, check what was reported at each step, and fix the tracking problems that come up most often.

Use this page to check your tracking before you launch, and to fix it when something is missing.

Before you test

  • Test on a deployed production build. Build with npm run build. The development server (npm run dev) leaves tracking out.
  • Use a new private window for each test. It starts a clean visit, with no ad details left over from an earlier test.
  • Pay with a test card. No money moves.
  • Do not use ?ignore=true. It turns tracking off for that browser tab.

Test orders reach your ad platforms

A test order reports a real-looking purchase to every platform you have turned on. A domain set to Development does not stop this; it only keeps the visit out of NEXT's own campaign analytics. Expect your test orders in your ad platform reports.

Store apps handle test orders in their own way:

Store appTest orders
Meta PixelSkipped unless Enable Sending Test Data is on
EverflowSkipped unless Enable S2S Postback for test orders is on
KlaviyoSkipped unless Enable Sending Test Data to Klaviyo is on
Shop SyncSent to Shopify only when you request fulfillment on the order

Run a test order

  1. Open your campaign in a new private window, with test details on the link:
https://campaign.example.com/?utm_source=test&utm_medium=cpc&utm_campaign=tracking-test&gclid=TEST&fbclid=TEST
  1. Go to checkout. Your platforms should show a page view and a checkout-started event.
  2. Enter your details and pay with a test card.
  3. Continue to the next page. This is where the purchase is reported. Each platform should show one purchase with your order number.
  4. Reload that page. No second purchase should appear.
  5. Accept an upsell if you have one. The upsell is reported on the page after it.
  6. Open the order in your store dashboard. Its attribution should show the test details from your link.

Each platform guide has a Verify it works section that says where to look in that platform. Developers can also inspect the campaign's events in the browser with the SDK's debugger.

A payment that fails reports no purchase. Only paid orders are reported. To check this yourself, a store with the Test Gateway can pay with the declining test card in the testing guide.

Check your numbers after launch

Once you have a few days of live orders, compare the number of orders in NEXT with the purchases each ad platform reports. Use the same days and the same timezone for both.

The two numbers should be close. If a platform shows noticeably more or fewer purchases than NEXT, see Common problems.

Common problems

Nothing is tracked

ProblemCauseFix
No platform receives anythingThe campaign was built with npm run devBuild with npm run build and deploy that
No platform receives anything, in one browser tab?ignore=true was used earlier in the tabOpen a new private window
One platform receives nothingIts ID is missing from _data/campaigns.jsonAdd the ID and rebuild
GTM or the Meta pixel loads but receives no eventsIt is switched off in assets/config.jsSwitch it on. See Google Tag Manager or Meta
Checkout events arrive but no page views or purchasesanalytics.mode in assets/config.js is not 'auto'Set it to 'auto'
A store app does nothing on the campaignMost tracking apps only add their scripts to your Storefront. A few, such as the Meta Pixel app's purchase, also cover campaign ordersSet the platform up with its guide in this section. See the overview for the apps that cover campaign orders
The checkout itself fails to load the cartThe campaign's domain is not in Allowed DomainsAdd it in the Campaigns app under Settings, then Allowed Domains

Purchases are missing

ProblemCauseFix
No purchase after a test orderThe shopper never reached the page after paymentContinue to the upsell or receipt page
No purchase when you reopen an order's pageEach order is reported onceExpected. Place a new test order
NEXT campaign analytics shows no sessionsThe domain is set to DevelopmentSet it to Production

Things are counted twice

ProblemCauseFix
Every event counted twice on one platformThe platform is set up in the template and also in Google Tag Manager or a page scriptKeep one
Meta counts each purchase twicestoreName in assets/config.js is missing or wrong, or a second server sender reports to the same pixelSet storeName to your store name. See Meta
Meta shows two page views per pageA second Meta pixel or your own page view callRemove the extra one
Sales counted twice on a Shop Sync storeThe campaign and a Shopify app both report the orderSee Tracking on Shop Sync stores

Numbers look wrong

ProblemCauseFix
Purchase amount is lower than the order totalThe purchase amount is the item prices only, without shippingExpected. GA4 and Google Tag Manager also receive shipping and tax as separate fields. Other platforms receive the amount alone
Upsell revenue is missing, or there are more purchases than ordersEach platform counts upsells in its own waySee Purchases and upsells in the platform's guide
Ad details are missing on the orderThe link lost its parameters, or the shopper moved to another domain or a new tabKeep the campaign on one domain and keep parameters on your ad links

On this page