HoopStar HubMarketing

Lead Codes · the HoopStar tracking standard · one format, every channel

Every lead carries a code.
Here's how to read & write one.

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:

Two rules to remember: a real new code always starts with # and a country — that opener marks it as the current format and keeps it from clashing with older codes. And the coded part is always the same length: 14 characters (# + four 2-letter slots + a 5-digit date), with an optional _label on the end.
01

Four questions, four slots

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.

Two letters can repeat across slots — position decides. IN = India in slot 1, Instagram in slot 3. ME = Middle East in slot 1, Meta in slot 3. Because the slots are always in the same order and the same length, there's never any doubt which is meant. And ZZ = Unknown in any slot — use it when you genuinely don't know that piece, never guess.
02

Decode any code

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

// decoded segments appear here
03

How a code becomes a tracked lead

The code only has to survive one trip: from the link a parent taps to the row we read in reports.

STEP 1
Tap a CTA

Parent taps WhatsApp on an ad, reel, bio link or the contact page.

→
STEP 2
Code rides along

The prefilled message ends with (#CODE).

→
STEP 3
Kommo captures it

The sales bot copies that first message into the lead's utm_code field.

→
STEP 4
It lands in reports

Saved on Leads.utm_code and decoded here in the hub.

So the message text is everything. If a parent edits the prefilled message and deletes the (#CODE), that lead loses its source — which is why organic numbers are a floor, not the full truth.
04

Two older formats (still readable)

These predate the standard. The decoder still understands them, but don't create new ones — every new code uses the format above.

Paid ad codes legacy

INHUME50826D2

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).

Organic codes legacy

#HUINREOR260622

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.

05

Building a code from a web visit

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 visitBecomesSlot
utm_source = meta / facebook adMEPlatform (Meta)
utm_source = instagramINPlatform
utm_source = googleGOPlatform
utm_source = organic / direct (no tag)WBPlatform (Web)
utm_medium = paid_social / cpcADPlacement (Ad)
utm_medium = social_profile (bio link)BIPlacement (Bio)
a plain landing-page / contact visitPGPlacement (Page)
isd code / utm_campaign prefix / geoIN · US · ME …Country
country can't be determinedZZCountry (Unknown)
utm_content / utm_campaign_labelContent
06

How a surface picks the code

Every page follows the same order, so a lead is never left with no source.

1

Use a code that's already in the link

If the URL carries a valid ready-made code, pass it straight through, untouched.

2

Build one from the visit's tags

Translate utm_source / utm_medium / country into the format using the table above.

3

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.

Single source of truth for the HoopStar lead-code standard — for people and code. Decoding mirrors the hub parser in organic.service.ts; the in-hub generator (under Organic → Generate code) mints & registers codes. Codes land on Leads.utm_code.