On this page
What this issue is
An affiliate or partner programme pays other people for sending you customers. To know who sent whom, the platform asks you to add a small piece of JavaScript to your site. This is the affiliate tracking script.
When a visitor arrives through a partner link, the script reads the click ID or referral code in the URL (for example irclickid for Impact or via for Rewardful) and saves it in a cookie. Later, at signup or purchase, that saved value links the sale to the partner.
The issue is simple: the script is not on the page. It may never have been installed, it may have been removed in a theme update, or it may only load on some pages.
| Platform | What loads | What it stores |
|---|---|---|
| Impact | Universal Tracking Tag (UTT) from your Impact account | Click ID from the irclickid parameter |
| PartnerStack | Growsurf-style partner tracking script (the translink or PartnerStack JS snippet) | Partner key from the referral link |
| Rewardful | rewardful.js plus a small rewardful queue snippet | Referral ID in a cookie, exposed as Rewardful.referral |
Why it costs you leads or sales
Without the script, the click from a partner is not recorded. Your partners send real traffic, but their dashboards show no referrals and no commission.
The damage builds slowly. Partners notice missing payouts, stop promoting you or leave the programme. You also lose clean data on which partners actually bring revenue, so you cannot decide where to invest.
- Partner link clickedURL carries the click ID or referral code
- Landing page loadsAffiliate script is not on the page
- No referral cookieNothing is stored
- Signup or purchaseSale has no partner attached
- CommissionPartner is not credited
The break happens on the landing page, but you only see the effect later.
Example: 40 sales really came from partners, but only the pages that still had the script credited them.
How to check if your site has it
Open a landing page in a private window
Use the real URL partners link to. Add a test parameter, for example
?irclickid=test123for Impact or?via=testpartnerfor Rewardful.Open DevTools and go to the Network tab
Press F12 (or Cmd+Option+I on Mac), choose Network, tick Preserve log and reload the page.
Search for the script file
Filter for
impact,partnerstackorrewardful. You should see the script load with status 200. No match means it is missing or blocked.Check the cookie
Open Application (Chrome) or Storage (Firefox), then Cookies. Look for the platform's cookie, such as
rewardful.referralor an Impact click cookie. If the script loaded but no cookie appears, see the cookie issue linked below.Test other page types
Repeat on the homepage, a blog post, a pricing page and a product page. Scripts are often added to the homepage only.
console.log('Rewardful:', typeof window.rewardful, window.Rewardful && window.Rewardful.referral);
console.log('Scripts:', [...document.scripts].map(s => s.src).filter(s => /impact|partnerstack|rewardful/i.test(s)));How to fix it
Always copy the snippet from your own affiliate dashboard. It contains your account ID, and the code differs between accounts. The steps below show where to put it.
Create a Custom HTML tag
In Tags, choose New, then Custom HTML, and paste the snippet from your affiliate dashboard.
Trigger on All Pages
Use the All Pages trigger so every landing page loads it. If you use a consent banner, set the correct consent type for the tag.
Preview and publish
Use Preview mode with a partner link, confirm the tag fires, then Submit the container.
Add the snippet to the site header
Use a header and footer scripts plugin, or your theme's custom code option, and paste the snippet so it loads in the head on all pages.
Check for an official plugin
Some platforms offer a WordPress plugin or WooCommerce integration. Use it if your programme supports it, and avoid adding the script twice.
Clear caches
Purge your caching plugin and CDN so the new script appears for visitors.
Use the platform's Shopify app if available
Install the Impact, PartnerStack or Rewardful app from your affiliate platform's instructions, which handles the script and order data.
Or edit theme.liquid
In Online Store, Themes, Edit code, open theme.liquid and paste the snippet before the closing head tag.
Order confirmation
Conversion tracking on the order status page is a separate step, covered in the related conversion pixel issue.
Open Project settings
Go to Project settings, then Custom code, and paste the snippet in the Head code box.
Publish
Publish the site. Custom code does not appear until you do.
Add a custom code snippet
In Settings, find Custom code under Advanced, add the snippet, set it to load on All pages and place it in the Head.
Publish
Publish the site and test on the live domain. Custom code needs a connected premium plan.
Use Code Injection
Go to Settings, Developer Tools, Code Injection and paste the snippet in the Header box. This needs a plan that supports code injection.
Save and test
Save, then test the live site with a partner link.
Add tracking code to funnels and sites
In each funnel or website, open Settings, Tracking Code, and paste the snippet into the Head Tracking Code box.
Repeat per funnel
Tracking code is set per funnel or site, so repeat it for each one partners link to.
Place the snippet in the shared head
Add it to the layout or template that every page uses, so it loads site-wide and not on one page only.
Load it early and without blocking
Keep the script tag as given by the platform. Do not remove async or defer attributes it includes.
<script>(function(w,r){w._rwq=r;w[r]=w[r]||function(){(w[r].q=w[r].q||[]).push(arguments)}})(window,'rewardful');</script>
<script async src='https://r.wdfl.co/rw.js' data-rewardful='YOUR_API_KEY'></script>How to confirm it's fixed
- The script file loads with status 200 on the homepage, a blog page and a landing page.
- Opening a link with a test partner parameter creates the platform's cookie.
- The console check shows the script or the referral object.
- The click appears in the affiliate platform's dashboard or test tool, where it offers one.
- A test signup or order made from a partner link shows the partner attached in the platform.
- The script loads only once per page, not twice.
How to prevent it happening again
- Install the script through one place, such as the tag manager, so a theme change cannot remove it.
- Keep a short note of where the script lives and who owns it.
- Retest with a partner link after every theme update, migration, redesign or tag manager publish.
- Ask your top partners to tell you if their dashboard referrals suddenly drop.
- Compare partner-attributed sales each week against the previous weeks and look into sharp falls.
Day 0
A theme update or redesign drops the script from the header.
Week 1
Sales still come in, so nothing looks wrong.
Week 3
A partner asks why their referrals stopped.
Week 4
You find and reinstall the script. Past sales are hard to credit.
How FunnelGuard handles this
FunnelGuard does not check for affiliate scripts yet. Detecting Impact, PartnerStack or Rewardful is a possible future check, not something it does today.
What FunnelGuard does do is run your real customer journeys on a schedule, such as lead forms, checkouts and booking buttons, and check each step plus the tracking hits sent to ad and analytics platforms like GA4, Google Ads and Meta. That can show you when a page or step breaks after a site change, which is often when affiliate scripts go missing too.
Questions people ask
Why is my affiliate tracking not working?
The most common cause is that the affiliate script is not loading on the landing page. Open DevTools, go to the Network tab and look for the Impact, PartnerStack or Rewardful file. If it is absent, add the snippet from your affiliate dashboard to every page.
How do I check if the Impact tracking script is installed?
Open your site in a private window with an irclickid test parameter, then check the Network tab for the Impact script and the Application tab for its cookie. Impact's own dashboard may also show whether the tag was seen. Test several page types, not only the homepage.
Where do I put the Rewardful script?
Place the Rewardful snippet in the head of every page, using your site's header code area or Google Tag Manager. Use the snippet with your own API key from the Rewardful dashboard. After publishing, check that window.Rewardful exists in the console.
Why does the affiliate script work on the homepage but not other pages?
The snippet was probably added to one template or page instead of the site-wide header. Move it into the shared layout or a tag that triggers on all pages. Partners often link to blog posts or landing pages, so those must have it too.
Can an ad blocker stop affiliate tracking?
Yes. Some blockers and privacy browsers stop affiliate scripts or cookies, so some partner clicks can be missed even when your install is correct. Test in a clean window to be sure your own setup works, and ask the platform about server-side options.
Do I need the affiliate script on the checkout page too?
The click script should be on all public pages so the referral is saved early. The conversion tracking on the order confirmation is separate and usually needs order data. Check your platform's guide for both.
Does FunnelGuard check for affiliate scripts?
Not yet. It is a possible future check. FunnelGuard currently monitors journeys, tracking hits to ad and analytics platforms and lead delivery, so check affiliate scripts manually for now.
Related issues
- 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-263Affiliate conversion fires for every order including non-affiliateFix guide
- TRK-265Shopify/Stripe affiliate integration not passing order IDsFix guide
- TRK-266Partner postback (S2S) failingFix guide