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 parameterTypical use
click_idStandard click identifier
clickidAlternate spelling
cidShort form click id
subidAffiliate network sub id
aff_subAffiliate sub id
affiliateAffiliate identifier
sourceTraffic source
campaignCampaign name
campaign_idCampaign 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" }