The problem
For a painting company client, the whole lead engine was built around forms. Forms were tracked by channel, the site was optimized to drive people to them, and phone calls were covered too, with CallRail numbers swapped by source.
The problem is that people don’t always do what you design for. About 30% of leads skipped both and sent an email instead. Someone clicks a Google ad, lands on the site, copies the email address, and writes in from their own inbox. The team follows up, the lead becomes a job, and the ad that brought them in never gets the credit.
Nearly a third of leads had no channel. That threw off everything downstream: cost per lead, campaign performance, where to spend next.
The idea
Show each visitor a different email address depending on how they found the site. The address they write to tells you the channel.
How it works
- Alternate addresses on the existing Google Workspace account, one per channel (aliases are free and all land in the same inbox, so the team’s workflow doesn’t change). For example:
- info@ → Direct
- contact@ → Google Ads
- service@ → Organic search
- estimation@ → Directories / review sites
- hello@ → AI search
- A small sitewide script (installed via WPCode) classifies the visitor’s source on arrival, stores it in a cookie, and swaps every email address on the site to the matching alias. The cookie means the right address follows them across pages.
- In Zapier, a new inbound email triggers the Zap. The “To” address maps to a channel.
- HubSpot “Create or Update Contact” with the sender’s address. It tells you whether the contact is new or existing, so one step does the lookup and the create, and the channel is written to the contact.
Things that bit me
- Cloudflare Email Obfuscation. Cloudflare rewrites email addresses in the HTML before your JavaScript can touch them. If you can’t turn it off, tag the elements that contain email addresses with a CSS class and target those, then re-run the swap after a short delay so it fires after Cloudflare’s decoder.
- Elementor widgets each need their own selector. Icon lists, image boxes, and plain mailto links all render the address differently. Overwriting the link text on an icon list wipes the icon.
- Clear your page cache. A caching plugin kept serving HTML from before the class was added, which looked exactly like a broken script.
- Don’t use HubSpot’s “New Engagement” trigger for this. Emails from unknown senders often don’t create an engagement object, so the trigger returns nothing even when the email is sitting in the shared inbox. Trigger on the email itself and do the contact lookup yourself.
- Filter out junk before it hits HubSpot. Test sends and spoofed senders will otherwise create contacts and fire new lead notifications.
Cost: no new tools or seats. Aliases are included with Workspace, and the script is a few dozen lines.
Happy to share it if anyone wants to try it. :-)


