Tracking clicks
Once the snippet is installed, click tracking is automatic. When a visitor lands on a tracked page, the tracker scans the URL for a click identifier, stores it, and reports the click to ConverStream.
Supported URL parameters
The tracker checks the page URL for these query parameters and uses the first one it finds as the click id:
| URL parameter | Typical use |
|---|---|
click_id | Standard click identifier |
clickid | Alternate spelling |
cid | Short form click id |
subid | Affiliate network sub id |
aff_sub | Affiliate sub id |
affiliate | Affiliate identifier |
source | Traffic source |
campaign | Campaign name |
campaign_id | Campaign identifier |
Cookie behavior
When a click id is detected, the tracker writes it to a first-party cookie on your domain. This lets ConverStream link a later conversion back to the original click, even if the visitor navigates across several pages before converting.
The auto-sent click event
As soon as a click id is captured, the tracker sends a click event for you. Under the hood it issues POST /api/v1/clicks, authenticated by your public site key (sent in the body as site_key).
{
"site_key": "PUBLIC_SITE_KEY",
"click_id": "xyz789",
"affiliate": "partner_42",
"source": "newsletter",
"campaign": "summer_sale"
}
Response 202 Accepted:
{ "success": true }
Error 401 Unauthorized — returned when the site key is missing or invalid:
{ "error": "unauthorized" }