ck-track class to any element you want to track.Paste this script tag before the closing </body> tag on any page you want to track:
<script src="https://clickking.io/static/js/track.js"
data-key="YOUR_API_KEY"></script>
Replace YOUR_API_KEY with the key shown on your dashboard. Replace the domain with your ClickKing deployment URL.
Add the ck-track CSS class to any clickable element. Optionally use data-track to give it a label:
<a href="https://example.com" class="ck-track" data-track="cta-button">
Click me
</a>
<button class="ck-track" data-track="signup-btn">
Sign Up
</button>
The tracker captures: label, target href, current page URL, and a timestamp. No cookies or user profiling.
Create short links from your dashboard. Each short link:
/r/<code>Every short link includes a fragment-based fallback. The destination URL is encoded directly into the link after the # character:
https://clickking.io/r/abc123#aHR0cHM6Ly9leGFtcGxlLmNvbQ
This means your links work across three tiers of resilience:
Fragments are never sent to the server, so the fallback has zero impact on normal tracking or performance. When sharing links, always use the full URL including the # fragment.
Smart Links turn any short link into a dynamic router. Instead of always redirecting to the same URL, a Smart Link evaluates a list of rules in priority order and sends the visitor to the first matching target. If no rule matches, the link falls back to the default URL. All four rule types can be combined on a single link.
| Type | When it fires | Example use case |
|---|---|---|
| Click Threshold | While click_count < max_clicks |
First 500 visitors to a launch page |
| Weighted Split | Always (weighted random) | 70 % → variant A, 30 % → variant B |
| Date Range | Current time is within start–end (link timezone) | Christmas promo 1 Dec – 1 Jan |
| Time of Day | start_hour ≤ current_hour < end_hour |
09:00–17:00 → live support, otherwise → self-service |
Fires while the link's total click count is below max clicks. Once the threshold is reached the rule is skipped and evaluation continues to the next rule (or falls back).
Example: Send the first 500 visitors to https://launch.example.com, then fall back to https://example.com.
Always fires. Traffic is split across two or more target URLs according to relative weights. Add at least two targets and assign each a weight (any positive number — they don't need to sum to 100).
Example: Weight 7 → https://variant-a.com, Weight 3 → https://variant-b.com gives roughly a 70/30 split.
Fires when the current time falls within the configured start and end datetimes, evaluated in the link's timezone. Outside the window the rule is skipped.
Example: Start 2024-12-01T00:00, End 2025-01-01T00:00 → active only during December (Europe/London timezone).
Fires when the current hour (in the link's timezone) is within start hour (inclusive) and end hour (exclusive). Hours are 0–24.
Example: Start 9, End 17 → routes to the support page during business hours; after 17:00 the fallback URL is used.
Rules are evaluated top-to-bottom in the order they appear in the rule builder. The first matching rule wins; remaining rules are not evaluated. If no rule matches, the visitor is sent to the Fallback URL.
The edit page shows a per-URL click breakdown for the last 30 days, so you can measure the real-world split across all targets and the fallback.
Delete all rules on the edit page and save. The Smart badge disappears and the link behaves like a plain short link, redirecting everyone to the fallback URL.
Submit a click event. Used internally by track.js but can also be called server-side.
POST /api/track
Content-Type: application/json
{
"key": "YOUR_API_KEY",
"url": "https://example.com/page",
"element": "cta-button"
}
Returns {"status": "ok", "used": 1, "quota": 500} on success.
Retrieve click analytics (requires login session).
GET /api/stats?days=7&link_code=all
Returns {"labels": [...], "values": [...]} for chart rendering.
| Free | Starter | Growth | Pro | |
|---|---|---|---|---|
| Embed links | 1 | 10 | 30 | 100 |
| Short links | 5 | 15 | 50 | 200 |
| Tracked clicks | 500 | 10,000 | 50,000 | 250,000 |
| Embed tracking | 7 days | 30 days | 180 days | 365 days |
| Short link tracking | 5 days | 14 days | 30 days | 90 days |
| Price | Free | £5/mo | £15/mo | £30/mo |