On this page
What this issue is
Affiliate and partner networks tag each click with an ID in the link, for example https://example.com/?irclickid=ABC123 (Impact) or https://example.com/?ref=partner42 (many referral tools). Your affiliate script reads that value from the URL on arrival and stores it in a cookie or in local storage. At purchase time the stored ID is sent back to the network so the partner gets paid.
- Partner link/?irclickid=ABC123
- RedirectSends visitor to / without the query string
- Affiliate scriptNo click ID found, nothing stored
- PurchaseOrder has no partner attached
- CommissionPartner is not credited
The redirect drops the query string, so every later step has no partner to credit.
Why it costs you leads or sales
Example: 100 sales really came from one partner. With the redirect stripping the click ID, almost none are credited.
The visitor arrives with the ID, the redirect drops it, and the affiliate script has nothing to save.
How to check if your site has it
Build a test URL
Take a real landing URL and add a fake ID, for example
https://example.com/?irclickid=TEST123&ref=TEST123. Test every variant partners might use: http, https, with and without www, with and without a trailing slash.Open it in a private window
Paste the URL and press Enter. Look at the address bar when the page settles. If
irclickidandrefare gone, a redirect removed them.See the redirect chain
Open DevTools, go to the Network tab, tick Preserve log and reload. Click the first request and read the Location header of each 301 or 302 response. Find the hop where the query string disappears.
Or use curl
Run the command below and compare the Location headers with your original URL.
Check the stored value
In DevTools open Application, then Cookies and Local Storage. Confirm your affiliate script saved the test ID. If it did not, the ID was lost or the script is missing.
curl -sIL "https://example.com/?irclickid=TEST123&ref=TEST123" | grep -iE '^(HTTP|location)'How to fix it
Find the redirect source
Check redirect plugins (Redirection, Rank Math, Yoast Premium, Safe Redirect Manager), your host's redirect settings and .htaccess. Disable one at a time and retest.
Pass the query string
In Redirection, edit the rule and set Query Parameters to 'Pass - ignore but pass parameters to the target'. In Rank Math, enable the option to keep query strings if offered, or switch the rule to a regex that appends
$1.Check the homepage and www rules
Under Settings > General, make sure WordPress Address and Site Address match the live domain so WordPress does not add a canonical redirect that drops parameters.
Review URL redirects
Go to Online Store > Navigation > View URL Redirects. Shopify redirects to a fixed target and does not pass query strings you did not include, so remove redirects from URLs that partners link to.
Point partners to the final URL
Ask partners to link to the live URL (for example the product or collection page) rather than a redirected one.
Check market and domain redirects
Under Settings > Domains, check which domain is primary. Redirects from secondary domains to the primary one can drop parameters, so test each.
Capture the ID early
Create a Custom HTML tag on the All Pages trigger (Page View or Initialization) that reads the click ID and saves it to a first-party cookie or local storage. Use the snippet in the code block below.
Fire it before redirects
Use the Initialization trigger so it runs as early as possible. This only helps when the redirect happens after the first page loads, such as a JavaScript redirect. It cannot recover an ID dropped by a server redirect.
Check 301 redirects
Go to Site settings > Publishing > 301 redirects. Webflow redirects do not carry query strings to the new path, so avoid redirects on URLs that carry affiliate links.
Use the final URL
Give partners the final page URL and remove redirect rules or custom code that rewrite the location.
Check funnel and domain redirects
In Sites > Funnels (or Websites), open the funnel Settings and Paths and check for step redirects and the domain's 'redirect to' setting.
Link to the final step
Use the full funnel step URL in partner links. If a step forwards to another URL, make sure the forward URL includes the parameters or capture them with the tracking script on the first step.
Review URL redirects
Go to Marketing & SEO > SEO > URL Redirect Manager (menu names can vary). Wix redirects point to a fixed address, so remove any redirect from URLs partners use.
Check domain connection
Under Domains, make sure the primary domain is the one in partner links so there is no www or non-www hop.
Review URL Mappings
Go to Settings > Developer Tools > URL Mappings. Remove or change mappings for URLs used in affiliate links.
Check the primary domain
Under Settings > Domains, set the primary domain so partners link to the version that does not redirect.
Append the query string in server rules
Use the Apache or nginx examples below. In Apache,
[QSA]appends the original query string. In nginx,$is_args$argsdoes the same, andreturn 301 https://$host$request_urikeeps it automatically.Fix JavaScript redirects
If code sets
window.location, addwindow.location.searchto the new URL.
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L,QSA]server {
listen 443 ssl;
server_name www.example.com;
return 301 https://example.com$request_uri;
}// Before: window.location.href = 'https://example.com/offer';
window.location.href = 'https://example.com/offer' + window.location.search + window.location.hash;(function () {
var params = new URLSearchParams(window.location.search);
['irclickid', 'ref'].forEach(function (key) {
var value = params.get(key);
if (value) {
document.cookie = key + '=' + encodeURIComponent(value) + '; path=/; max-age=2592000; SameSite=Lax';
}
});
})();How to confirm it's fixed
- Open each test URL variant (http, https, www, non-www, with and without trailing slash) with
?irclickid=TEST123&ref=TEST123and confirm both parameters remain in the address bar. - Run the curl command and confirm every Location header includes the query string.
- In DevTools > Application, confirm the click ID is saved in a cookie or local storage.
- Complete a test order if your network or store supports a test mode, and confirm the click ID reaches the order or the network's dashboard.
- Ask the partner or check the network dashboard to confirm a test click is recorded.
Before the fix
- `/?irclickid=ABC123` redirects to `/`
- Affiliate script finds no ID
- Orders arrive as direct traffic
- Partners report zero conversions
After the fix
- `/?irclickid=ABC123` keeps the full query string
- ID is saved on arrival
- Orders carry the partner ID
- Commission is credited
How to prevent it happening again
- Keep a short list of affiliate entry URLs and retest them after any change to redirects, domains, SSL, themes, plugins or the CMS.
- Test after a site migration, a domain change or a new landing page.
- Give partners the final URL, not one that redirects.
- Document which redirect rules exist and who owns them.
- Compare partner-reported clicks against your credited sales each month so a sudden drop stands out.
How FunnelGuard handles this
Questions people ask
Why is my irclickid missing after the page loads?
A redirect is most likely dropping the query string before your affiliate script runs. Common sources are http to https rules, www redirects, trailing-slash rules and redirect plugins. Open the URL with a test irclickid and check the Network tab to find the hop where it disappears.
How do I keep URL parameters on a redirect?
Configure the redirect to pass the query string. In Apache add the QSA flag, in nginx use return 301 https://example.com$request_uri, and in redirect plugins choose the option that passes parameters. In JavaScript, add window.location.search to the new URL.
Why are my affiliates not getting credit for sales?
The click ID may never reach your site's tracking, often because a redirect strips it. Other causes are a missing affiliate script, a cookie set on the wrong domain, or a missing conversion pixel. Test the entry URL with a fake ID first, as it is the quickest check.
Does a 301 redirect remove query parameters?
Not by default in every system, but many rules and platforms do. Server rules that point to a fixed target, and tools such as Shopify, Webflow and Wix URL redirects, send visitors to the new address without the original parameters. Always test with a real query string.
Can I save the affiliate ID in a cookie myself?
Yes, a script can read irclickid or ref from the URL and store it in a first-party cookie as a backup. It only works if the ID is still in the URL when the script runs. Your network may require its own script to handle credit, so follow its documentation.
How do I test affiliate tracking without real clicks?
Add a fake ID such as ?irclickid=TEST123 to your landing URL and check that it survives the redirects and gets stored. Use the network's test mode or a test order if available. Do not generate fake clicks on live partner links.
Can FunnelGuard detect a lost affiliate click ID?
Partly. It checks that configurable persistence keys, such as UTMs and the parameters you add, survive redirects on the journeys you set up. It does not confirm the affiliate network recorded the click or paid a commission.
Related issues
- TRK-259Affiliate tracking script missing (Impact, PartnerStack, Rewardful)Fix 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
- TRK-266Partner postback (S2S) failingFix guide