Lead Codes · the HoopStar tracking standard · one format, every channel
A lead code is the tiny tag we append to a WhatsApp message so a lead becomes traceable — which market, class, platform and piece of content brought them in. Going forward, every surface uses the one format below: paid ads, reels, bio links, landing pages, the contact page. Same grammar everywhere, so any human or any script can read it.
Reads as:
Each slot answers one thing — which market · which class · which platform · which placement — then a 5-digit date YMMDD and an optional _label. Every slot is exactly two letters, so the code is fixed width and reads by position — no guessing.
Paste a code (or tap an example). It works on the new format and the two older ones still in the data.
◇ Live decoder · runs in your browser
The code only has to survive one trip: from the link a parent taps to the row we read in reports.
Parent taps WhatsApp on an ad, reel, bio link or the contact page.
→The prefilled message ends with (#CODE).
The sales bot copies that first message into the lead's utm_code field.
Saved on Leads.utm_code and decoded here in the hub.
These predate the standard. The decoder still understands them, but don't create new ones — every new code uses the format above.
Country · Class · Objective · Date · Variant. No #. Set inside the Meta ad's WhatsApp welcome message. New ads should switch to the standard format — they'd read #INHUMEAD… (Meta · Ad).
Class · Platform · Channel · Type · Date. Has the # but no country, and a separate channel + type the new format folds into one placement. Decodes fine; just don't mint new ones.
On landing pages and the contact page the code is built automatically from the visit's utm_* tags. This is the translation it uses.
| Signal on the visit | Becomes | Slot |
|---|---|---|
| utm_source = meta / facebook ad | ME | Platform (Meta) |
| utm_source = instagram | IN | Platform |
| utm_source = google | GO | Platform |
| utm_source = organic / direct (no tag) | WB | Platform (Web) |
| utm_medium = paid_social / cpc | AD | Placement (Ad) |
| utm_medium = social_profile (bio link) | BI | Placement (Bio) |
| a plain landing-page / contact visit | PG | Placement (Page) |
| isd code / utm_campaign prefix / geo | IN · US · ME … | Country |
| country can't be determined | ZZ | Country (Unknown) |
| utm_content / utm_campaign | _label | Content |
Every page follows the same order, so a lead is never left with no source.
Use a code that's already in the link
If the URL carries a valid ready-made code, pass it straight through, untouched.
Build one from the visit's tags
Translate utm_source / utm_medium / country into the format using the table above.
Fall back to a web code
No tags at all? Still emit something — e.g. #ZZHUWBPG60624_contact — so the click is attributable to the page, not lost.
◆ The rule going forward
One format, everywhere. Any new surface that opens WhatsApp — a new landing page, a campaign, a button — generates its code from this single shared standard. No new bespoke formats. People generate codes from the in-hub generator; code uses the shared library.
organic.service.ts; the in-hub generator (under Organic → Generate code) mints & registers codes. Codes land on Leads.utm_code.