On this page
What this issue is
An affiliate conversion tag tells your affiliate network (for example Impact, PartnerStack, Rewardful or similar) that a sale happened. It should only report sales that were referred by a partner. This issue happens when the tag sits on the order confirmation page with no condition, so it fires for every order: direct, paid ads, email, organic and affiliate.
Why it costs you leads or sales
The damage is mostly money and bad data. You may pay commission on sales you would have won anyway. Partner reports look better than reality, so you spend more on the wrong partners. Margins shrink, and disputes grow when your finance numbers do not match the network dashboard.
- Visitor arrivesFrom search, ads or email. No affiliate link.
- Order placedCustomer reaches the confirmation page.
- Affiliate tag firesNo check for a click ID or cookie.
- Network records a saleOrder appears in partner reports.
- Commission owedYou may pay on an order no partner drove.
The tag has no condition, so the order is reported to the network as if a partner sent it.
Example: a store with 200 orders in a week, of which 20 came from affiliate links. A tag firing on every order reports 200.
How to check if your site has it
Compare totals
For one week, compare orders in your shop or CRM with conversions in the affiliate network. If they are nearly equal, the tag is probably firing on everything.
Open a clean browser session
Use a private window with no affiliate link, no affiliate cookie and no coupon from a partner. Clear cookies first.
Place a test order
Use test mode or a low-value real order you can refund. Do not enter fake card details on a live checkout.
Watch network requests
On the confirmation page, open DevTools, go to the Network tab and filter for your affiliate network's domain. If a conversion request is sent, the tag fires without a referral.
Review the tag setup
In Google Tag Manager, check the tag's triggers and exceptions. In a theme or plugin, look for the pixel code on the order status or thank-you template.
Check network matching rules
In the network dashboard, see how conversions without a click ID are handled, and whether any appear as approved or pending commissions.
How to fix it
Create a variable
Add a 1st-party cookie variable that reads your network's click ID cookie (name from the network docs), or a URL variable for the click ID parameter.
Add a trigger condition
On the affiliate conversion tag's trigger, add a condition: your variable 'does not equal' undefined and 'does not match RegEx' ^$. Keep the existing order confirmation condition too.
Preview and test
Use Preview mode. Test once with the cookie and once without. The tag should fire only in the first case.
Publish
Submit the container version with a clear name such as 'Affiliate tag: only with click ID'.
Find where the pixel lives
It is often in a plugin setting, a header/footer scripts plugin, or the WooCommerce thank-you template. Check each.
Use the plugin's own tracking
If you use an affiliate plugin (for example for WooCommerce), use its built-in order tracking, which usually only records referred orders, and remove the hand-pasted pixel.
Or wrap the code
If you must keep custom code, wrap it in a check for the affiliate cookie (see the code example below).
Find the script
Check Settings > Customer events (custom pixels) and the older Additional scripts box under Settings > Checkout, plus any affiliate app.
Add a condition
In a custom pixel, read the click ID from the cookie or stored value and call the network's conversion function only if it exists.
Prefer the app integration
If your affiliate app sends conversions itself, remove the duplicate manual script so it is not firing for all orders.
Find the code
Check Project settings > Custom code and the custom code section on the order confirmation page.
Add the cookie check
Wrap the conversion call in the JavaScript check shown below so it runs only when the click ID is present.
Read the click ID
Read the affiliate cookie or the value saved on the order server side.
Fire conditionally
Render the conversion script only when a valid value exists. Server-side rendering is more reliable than client checks.
function getCookie(name) {
var m = document.cookie.match(new RegExp('(?:^|; )' + name + '=([^;]*)'));
return m ? decodeURIComponent(m[1]) : null;
}
var clickId = getCookie('aff_click_id'); // use the cookie name from your network docs
if (clickId) {
// call your network's conversion function here
// e.g. networkConversion({ orderId: 'ORDER_ID', clickId: clickId });
}How to confirm it's fixed
- A clean-session test order sends no conversion request to the affiliate network.
- A test order started from a real affiliate link sends exactly one conversion with the right order ID.
- The order ID in the network matches the order in your shop.
- Over the next week, network-reported sales are clearly below total orders.
- No unexpected pending commissions appear for direct or paid orders.
Unconditional tag
- Every order is reported to the network
- Partners are credited for sales they did not drive
- Network totals roughly match store totals
Conditional tag
- Only orders with a click ID or cookie are reported
- Commissions follow real referrals
- Network totals are a small share of store totals
How to prevent it happening again
- Keep one place for the affiliate conversion tag, and remove old copies from themes, plugins and GTM.
- Name tags and triggers so the condition is obvious.
- Re-run the clean-session and affiliate-link tests after theme changes, checkout updates or tag changes.
- Reconcile network sales against store orders monthly.
- Document which cookie or parameter your network uses.
How FunnelGuard handles this
Frequently asked questions
Questions people ask
Why is my affiliate network showing as many sales as my store?
Most likely the conversion tag fires on every order confirmation page with no condition. Test a clean-session order with no affiliate link and see whether a request goes to the network. If it does, add a click ID or cookie condition.
How do I make an affiliate pixel fire only for affiliate orders?
Fire it only when an affiliate click ID or cookie is present. In Google Tag Manager, add a variable that reads that value and use it as a trigger condition. On other platforms, wrap the conversion code in the same check or use your affiliate app's built-in tracking.
Will I overpay affiliate commissions if the tag fires on all orders?
You might. It depends on how the network matches conversions. Some ignore sales with no click ID, others may credit a partner through coupons or loose matching. Check the dashboard for approved or pending commissions on orders no partner referred.
How can I test if my affiliate conversion fires without a referral?
Open a private window, clear cookies, and place a test order without any affiliate link. Open DevTools, go to the Network tab and filter for your network's domain on the confirmation page. Any conversion request means the tag is unconditional.
Can Google Tag Manager stop the affiliate tag firing on non-affiliate orders?
Yes. Create a 1st-party cookie or URL variable for the click ID, then add a condition so the tag runs only when it has a value. Use Preview mode to test with and without the cookie before publishing.
Does FunnelGuard detect affiliate tags firing on every order?
No. This is not a current FunnelGuard check, only a possible future one. FunnelGuard monitors journeys and tracking hits for ad and analytics platforms, so for this issue you should reconcile network sales against store orders manually.
What if fixing the condition stops genuine affiliate sales being tracked?
That usually means the click ID is not being saved, for example lost on a redirect or stored on the wrong domain. Test with a real affiliate link and confirm the cookie exists on the confirmation page before you publish the change.
Related issues
- TRK-259Affiliate tracking script missing (Impact, PartnerStack, Rewardful)Fix guide
- TRK-260Affiliate click ID (irclickid, ref) lost on redirectFix guide
- TRK-261Affiliate cookie not set or wrong domainFix guide
- TRK-262Affiliate conversion pixel missing on order confirmationFix guide
- TRK-264Coupon-code attribution conflicts with affiliate cookieFix guide
- TRK-265Shopify/Stripe affiliate integration not passing order IDsFix guide