Skip to main content
Analytics & reporting

How orders are attributed to a bundle

When a customer buys through one of your bundles, Bundlex needs a reliable way to know that this order belongs to that bundle. It does this with a hidden code stamped onto each cart line at checkout, not by matching discount names. This article explains how that attribution works, which line items get counted, and why some orders are correctly left out.

The code, not the discount name

Every published bundle maps to one Shopify automatic app discount, and each bundle carries its own permanent ID (a UUID). At checkout, the Bundlex cart Shopify Function stamps that ID onto each qualifying cart line as a hidden line-item property called _bx_discount_id (sometimes referred to informally as the _bundlex code). When Bundlex later syncs the order from Shopify, it reads that property and links the line item to the matching bundle.

The important part: attribution is keyed on the UUID, not on the discount's display name or checkout label. You can rename a bundle, change its checkout label, or use the same name another app uses, and attribution still works correctly. The name Shopify shows on the order (the discount title) often will not even match your bundle's name, and that is fine. The code is what counts.

The _bx_discount_id code is hidden from customers and cannot be removed from the Shopify admin. It exists purely so Bundlex can credit the right bundle.

Why name matching was dropped

Bundlex used to fall back to matching discount titles. That fallback was removed in March 2026 because it produced false attribution: a competing bundle app using the same discount title would get orders wrongly credited to Bundlex. Since then, all new orders are attributed by UUID only, regardless of what name you give the bundle.

Line items without the code are skipped

If a line item does not carry the _bx_discount_id code, Bundlex skips it entirely. It is not saved to the analytics database and contributes nothing to your reports. An order is only stored when it has at least one Bundlex-attributed line item, so a regular Shopify order with no Bundlex discount simply never appears in your bundle stats.

This is why your reports stay clean: the only revenue and order counts you see are the ones a bundle actually touched.

Historical orders before March 2026

Orders placed before the March 2026 switch to UUID attribution cannot be retroactively linked. Those older orders relied on title matching, the original titles are now frozen on the Shopify side, and the matching Bundlex discounts have since been renamed or deleted. There is no reliable key left to connect them.

The practical effect is that your overall attribution coverage improves over time as new orders come in. There is nothing to fix on your end; older gaps simply age out of the recent windows you look at most.

When a competing app wins the cart

If you run another bundle or discount app alongside Bundlex, Shopify may pick that other app's discount for a given cart. When that happens, the Bundlex cart Function never runs, so the _bx_discount_id code is never stamped, and the order is correctly not attributed to Bundlex.

This is the intended outcome, not a tracking failure: the sale was driven by the other app, so crediting Bundlex would overstate its impact. Tell-tale signs when inspecting such an order:

  • The discount appears as a manual application rather than an automatic one.
  • The discount is spread proportionally across items instead of producing a clearly discounted line.
  • The _bx_discount_id code is absent.
  • The discount title does not match any Bundlex bundle.

If you expected Bundlex to win these carts, the fix is on the configuration side: disable the competing app or make sure Bundlex takes priority. Keep in mind Shopify caps a store at 25 active automatic discounts across all apps, so overlapping discount apps can crowd each other out. See stacking with other discounts for how Bundlex coexists with other discounts.

How BOGO (Buy X Get Y) is attributed

Buy X Get Y offers behave differently from percentage, fixed-amount, or exact-price offers. With those simpler types, Shopify attaches the discount to the discounted line and the code is stamped there as usual.

For a typical BOGO, Shopify attaches the discount allocation to the free unit, not to the paid "trigger" items. So:

  • The free unit carries the _bx_discount_id code and is where the bundle's revenue is captured.
  • The paid trigger items have no allocation and no code, so they are skipped (not saved) just like any other unattributed line.

This is expected. The revenue from the deal is recorded on the free unit, so BOGO performance still shows up in your reports even though the paid trigger lines are not stored.

One exception: some BOGO configurations cause Shopify to spread the discount proportionally across every item instead of making one unit free. In that case no line gets the _bx_discount_id code, so the whole order is left unattributed. If a BOGO bundle shows no attributed revenue, check that its discount is published and that the free unit is a different variant from the main product. See setting up Buy X Get Y.

Quick reference

SituationAttributed to Bundlex?
Line carries the _bx_discount_id codeYes, linked to that bundle by UUID
Line has no _bx_discount_id codeNo, the line is skipped entirely
Order placed before March 2026 and never linkedNo, and it cannot be linked retroactively
A competing app's discount won the cartNo, correctly excluded
BOGO free unit (one unit made free)Yes, revenue is captured here
BOGO paid trigger itemsNo, skipped (expected)
BOGO discount spread proportionallyNo, the whole order is unattributed

Was this article helpful?

Your feedback helps us improve our docs.

Thanks - we'll keep improving this article.

Want to chat with our team? Still have a question?

Still need help?

Our team is one click away. Send us a message and we'll get back to you.

We use a few cookies to keep this site working, measure how it is used, and power our chat widget when you open it. See our cookie policy.