Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Affiliate tracking not passing order IDs on Shopify or Stripe

TRK-265Medium impactOther toolBy FunnelGuardPublished Updated
On this page

What this issue is

An affiliate platform (for example Impact, PartnerStack, Rewardful or a similar tool) records a conversion when a customer buys. Along with the amount, it should receive a unique order ID. That ID is the key that links the affiliate's commission to one real order in your store or in Stripe.

This issue happens when the ID is missing, empty, a literal template tag such as {{order_id}}, the same value for every order, or a different ID from the one you use in Shopify or Stripe. The sale may still show up, but it cannot be matched.

Why it costs you leads or sales

Without a reliable order ID, you lose control of the money you pay out and the partners you rely on.

What goes wrong
  • Refunds and cancellations cannot be matched, so you pay commission on orders that were reversed.
  • Duplicate conversions are not removed, because deduplication usually relies on the order ID.
  • Partners dispute payouts, because neither side can prove which order a commission belongs to.
  • Reports from the affiliate tool do not match Shopify or Stripe, so you cannot trust partner ROI.
  • Good partners may leave if their sales look missing or wrong.
Where the order ID gets lost
  1. Click on partner linkAffiliate cookie is set
  2. Customer paysOrder exists in Shopify or Stripe
  3. Conversion sentOrder ID empty or wrong
  4. Reconcile and refundCannot match to the order
  5. Correct payoutDisputes and overpayment

The sale is recorded, but the link back to the real order is broken.

How to check if your site has it

Check order IDs end to end
  1. Open recent conversions in your affiliate tool

    Look at the order or transaction ID column. Blank values, the same value repeated, or text with curly braces mean the ID is not being passed.

  2. Compare with Shopify or Stripe

    Pick three recent orders. In Shopify, note the order number and the order ID from the order URL. In Stripe, note the payment intent, charge or checkout session ID. Check whether any of these appear in the affiliate tool.

  3. Place a test order through an affiliate link

    Use a partner link or test link from your affiliate tool, then buy with Shopify bogus gateway or Stripe test mode. Do not use real card details for tests.

  4. Inspect the conversion request

    Open browser developer tools, Network tab, filter by your affiliate vendor name, and complete the order. Check the request payload for the order ID parameter and its value.

  5. For server-side setups, check webhook logs

    In Stripe, open Developers, Webhooks and look at the event payload and delivery response. In your affiliate tool, look for the received event and its ID field.

How to fix it

First decide which ID your affiliate tool expects, and use the same one everywhere. Shopify customers usually see the order number (such as #1001), while the system also has an internal numeric order ID. Stripe has several IDs. Pick one, keep it consistent and match what the tool documents.

Pass the order ID by platform
  1. Use the order status or checkout script area

    In Shopify admin go to Settings, Checkout (or Customer events for pixels). Add the affiliate conversion code as a custom pixel or in the additional scripts area if your plan still has it.

  2. Map the variable

    In a custom pixel, read the order from the checkout_completed event: event.data.checkout.order.id for the order ID, and event.data.checkout.currency and totalPrice for value. Send them in the field your affiliate tool calls order ID.

  3. Check the app

    If you use the affiliate vendor's Shopify app, open its settings and confirm order ID mapping, then reinstall or update it if the field stays blank.

Example: Shopify custom pixel passing the order IDjavascript
analytics.subscribe('checkout_completed', (event) => {
  const checkout = event.data.checkout;
  const orderId = checkout.order && checkout.order.id;
  if (!orderId) return;
  // Replace with your affiliate vendor's real conversion call
  console.log('Send to affiliate tool', {
    orderId: orderId,
    amount: checkout.totalPrice.amount,
    currency: checkout.currency
  });
});
Conversion record before and after

Before

  • Order ID blank or {{order_id}}
  • Duplicates counted twice
  • Refunds cannot be matched

After

  • Real Shopify or Stripe ID on each conversion
  • Duplicates removed by ID
  • Refunds reverse the right commission

How to confirm it's fixed

Verify the fix
  1. Place a new test order via an affiliate link

    Use test mode or a bogus gateway, never real card details.

  2. Find it in the affiliate tool

    The conversion should show the exact ID from the test order.

  3. Reload the confirmation page

    Check that no second conversion appears with the same ID, or that it is rejected as a duplicate.

  4. Refund the test order

    Confirm the affiliate tool reverses or flags the matching commission.

How to prevent it happening again

Keep order IDs reliable
  • Document which ID (order ID, order number, payment intent) each tool uses.
  • Reconcile affiliate conversions against Shopify or Stripe every month.
  • Retest after theme changes, checkout changes, app updates or a new payment method.
  • Prefer webhook or server-side conversions for Stripe, as they do not depend on the browser.
  • Keep the affiliate script and data layer under version control or change notes.

How FunnelGuard handles this

This issue is outside what FunnelGuard checks. Whether your affiliate platform receives the correct order ID and matches it to Shopify or Stripe records is a data reconciliation job. It needs your affiliate tool's reports or an order reconciliation and affiliate management tool, which compare real transaction records.

FunnelGuard is a synthetic monitoring service that runs your customer journeys on a schedule and checks steps, tracking hits and lead delivery. It can help with related checks, such as whether your funnel pages load, but it does not verify order IDs in your affiliate reports. A free read-only website audit is available if you want a broader look at your site.

Questions people ask

Why is my affiliate tracking not passing the order ID?

Usually the conversion code reads a variable that is empty on the confirmation page, or a template tag is sent as plain text. It can also be a Shopify app or Stripe webhook that does not map the ID field. Inspect the conversion request or webhook payload to see what is actually sent.

Which order ID should I send to my affiliate tool from Shopify?

Send the ID your affiliate vendor documents, and use it consistently. Shopify has a customer-facing order number and an internal numeric order ID. Either can work if the tool and your reports use the same one.

How do I pass a Stripe order ID to an affiliate platform?

Use a webhook such as checkout.session.completed or payment_intent.succeeded and send the session, payment intent or charge ID to the affiliate API. Store the partner reference in client_reference_id or metadata when creating the session, so you can read it in the webhook.

Why are affiliate conversions counted twice?

If the order ID is missing, the tool cannot tell that a reload or a repeated event is the same order. Passing a unique ID on every conversion lets most platforms discard duplicates.

Can I test affiliate order IDs without real payments?

Yes. Use Stripe test mode or Shopify's bogus gateway, and place the order through an affiliate link. Never use real card details for testing.

Does a missing order ID affect refunds and commissions?

Yes. Refund reversals usually match on the order ID. Without it, you may pay commission on refunded orders or need to correct payouts by hand.

Can FunnelGuard check if order IDs reach my affiliate platform?

No. That is outside what FunnelGuard checks. Use your affiliate tool's reports or a reconciliation tool that compares affiliate conversions with Shopify or Stripe orders.

Does FunnelGuard catch this?

Other tool

Needs a different kind of tool.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.