Analytics and attribution
First-party analytics and lead attribution



The problem
Most owners pay for a website and then take someone’s word that it works. They cannot see who called or where a lead came from. When the phone is quiet, they have no way to tell whether the site is the reason.
How it runs
Goes in
- A visit, with its ad click and its campaign
- A form sent
- A phone number tapped
What happens
- The ad click and the campaign are read on the server, before the page renders
- They are kept in two first-party cookies
- The lead is stored with both when the form is sent
- Crawlers are counted apart from people
Comes out
- Every lead with where it came from
- Visits, phone taps, and review clicks
- A log of what the spam check held back
What I built
Visits
The dashboard counts visits to the site, so an owner can see whether people are finding it. A site with no visits has a search problem. A site with visits and no leads has a different one, and the owner can tell which he is looking at.
Leads by source
Every lead is listed with where it came from, and with the search behind it where that was recorded. A lead from a Google search and a lead from an ad are counted apart. A lead counts only when the lead email is sent, so the number cannot be padded.
Phone taps
Many homeowners never fill out a form. They tap the phone number. The dashboard counts every tap. It cannot see a call that someone dials by hand.
Review clicks
When a customer clicks through to leave a review, the dashboard counts that too. The owner can see whether the review loop is working.
Spam held back
Every form has a spam check. The dashboard keeps a log of what was held back and why, so the owner can see that nothing real was thrown away.
Updated live
The numbers update live. The owner opens the dashboard from a link on his phone, with no app to install.
Part of every site
Every site I build ships with the dashboard. It is part of the site’s own code, so it needs no cookie banner. The owner does not have to ask for a report.
How it is built
The ad click and the campaign are read on the server when the visitor arrives, before the page renders. They are kept in two first-party cookies, one for the first visit and one for the latest campaign visit.
When a form is sent, the lead is stored with both. It traces to the ad, the keyword, and the page it landed on.
Visits and events are written to the site’s own database at the edge. Nothing is sent to an outside tracker, and the analytics tables hold no name, phone, or email.
Crawlers are counted apart from people, so the visit count is people.
The dashboard also shows the path from a visit to a sent lead, how far down each page people read, and which buttons they tap.
The result
An owner never has to wonder whether the site works.