Key takeaways
- Our partner program pays a referral commission when a visitor arrives through a partner's link and later buys. On August 19 we checked which of our own pages actually record the code when that visitor lands.
- Eight of 24 pages on the main site never loaded the capture script. One of them had a lead form that sent an empty code for as long as it existed.
- Our presentation site read only two older link formats from programs we had already retired. A partner sharing it earned nothing unless the form happened to pass the code along.
- Two rules came out of the fix: a code already stored wins over a new one in the link, and capture happens the moment the page loads.
- Everything was fixed and deployed that day. A new page still needs the script added by hand, and when I re-ran the check for this post, pages built since had missed it again.
A referral card at the front desk only works if somebody asks for the code. If the card gets handed over and nobody writes it down, the referrer did the work and the record says nobody referred anyone. We run our own marketing automation in San Jose on our own sites, and on August 19 we found the digital version of that card: links that looked perfect and credited nobody.
How a partner link is supposed to work
We run one partner program. A partner gets a code, and shares a link to any of our sites with that code on the end. When the visitor arrives, a small script reads the code, stores it in a cookie on our domain for 90 days, and from then on it travels with that visitor. When they fill in a lead form or buy from the shop, the code goes along, and the partner gets credit for the sale.
Because the cookie sits on the parent domain, the same code works across the main site and the shop, with one link format for every property.
What the audit found
The main site had 24 pages. Eight of them never loaded the capture script at all: the about page, the blog, contact, intake, the privacy and terms pages, the post template, and the product page for our own AI system. That last one was the worst. It carried a lead form, and the form's submit code asked the capture script for the stored code. With no script on the page, that function did not exist, so the form posted an empty code. Every lead that came through that page, for as long as the page existed, arrived with no referrer attached.
The presentation site was a different failure. It read referral codes, but only in two older link formats from programs we had already shut down. The live program's format was invisible to it, and it never wrote the shared cookie. The only reason it ever paid anyone was an accident: the server behind the lead form accepts three spellings of the code, so when a form happened to pass one along, the credit landed anyway.
The two rules the fix taught
Fixing the presentation site took two attempts. The first one read the link's code before the stored one. That is last touch wins. Partner A sends a prospect to us, the prospect comes back a week later through Partner B's link, and B takes A's credit, by accident or on purpose. So stored attribution is read first, and an incoming code is ignored whenever one is already stored. First touch wins, which is the rule the server already enforced on the deal record.
The second rule is about timing. The presentation site only read the code when the form was submitted, so a visitor who arrived with a code, looked around and left had never been counted. Capture has to happen the moment the page loads, which is how the main site's script has always worked, and now the presentation site does the same.
What we did not fix
Nothing enforces that a new page loads the script. Each page needs one tag added by hand, ahead of the form code, or it quietly rejoins the list. We wrote a one line check that prints every page missing it.
I ran that check again while writing this post. The main site has grown to 57 pages, and 13 of them do not load the script. Four of those carry a form. They are mostly comparison and tool pages built since August, and it is the same gap on new pages. The tag fixes each of them, and the real fix is making that check part of every deploy, which it is not yet.
The honest lesson
A link with the right code on it proves nothing about the page it points at. Attribution is a chain: the page loads the script, the script stores the code, the form reads the code, the server writes it to the record. Any link in that chain can be missing and nobody sees an error. The partner and the visitor both see a normal page. The only person who notices is the partner reading an empty commission report, and they will assume nobody bought.
The test is cheap. Open each property with a made up code on the link, then look for the cookie. One caution: on our main site a made up code stores like a real one, and first touch wins for 90 days, so clear the cookie afterward.
What this means for San Jose businesses running marketing automation
If you pay referral fees or want to know which campaign a lead came from, you have this chain somewhere, and it was probably set up once and never audited.
- List every page on your site that has a form, and confirm each one loads the same tracking as your home page. New landing pages are where it breaks.
- Visit your own site through a referral link with a fake code and submit a test lead. Then open the contact and see whether the code arrived.
- Decide whether the first referrer or the last one gets credit, write it down, and make sure the code agrees with the policy.
- When you build a new page, add the tracking before the form, not after launch.
If your marketing automation in San Jose credits a referral partner, look past whether the link is right and check whether the page on the other end wrote anything down.
Want to build this yourself?
Join the On Point Tech Academy at optechsol.llc/academy. It's free, and we build live every Tuesday and Thursday.
The On Point Tech Academy costs nothing and never asks for a card. We build live every Tuesday and Thursday, 12:30 to 1:30 PT.
Join the Academy free ← Back to all Field Notes