← All guides

How to count conversions

A conversion is a visitor action that matters to you: a lead, a payment, a sign-up. FunnelLink ties it to the click on your link, so you see not just visits but results.

How it works: when someone follows the short link, a click identifier — ?flc=… — is automatically added to the destination address. Nothing to configure. One thing is left: tell us at the moment of the action. There are two ways; pick one.

Way 1 — a pixel on your site (easier)

Works if you have your own site or landing page. Step 1: paste the pixel once, before the closing </body> tag:

<script src="https://funnellink.cc/pixel.js" defer></script>

The pixel remembers the click identifier itself and keeps it as pages change. Step 2: at the moment of the target action, call the goal by its name:

funnellink('checkout_done');

The goal name is any latin word: lead, paid, signup. One link can have several different goals.

Common cases:

A lead on a button — call the goal right in onclick:

<button onclick="funnellink('lead')">Leave a request</button>

A purchase — the «Thank you for your order» page opened: the goal becomes the page load itself. Add the data-goal attribute and there's no need to call the function:

<script src="https://funnellink.cc/pixel.js" defer data-goal="order_done"></script>

A form submit — in the handler after a successful submit:

form.addEventListener('submit', () => funnellink('form_sent'));

Way 2 — a postback from your server (more reliable)

Best for payments: ad blockers don't touch server requests, so it's better to send the event from your backend. Step 1: at checkout, save the flc value from the page address (in the order data, for example). Step 2: at the moment of payment, send the request:

POST https://funnellink.cc/api/conversions Content-Type: application/json {"clickId": "[flc value]", "goal": "paid"}

The same via curl — handy to test by hand:

curl -X POST https://funnellink.cc/api/conversions \ -H 'Content-Type: application/json' \ -d '{"clickId": "abc123-...", "goal": "paid"}'

A full example

You hand out the link funlnk.cc/promo. A visitor clicks and lands on landing?flc=abc123 — the pixel remembers abc123. The visitor places an order, on the «thank you» page funnellink('order_done') fires — and on the dashboard the variant that brought this visitor gets a conversion and a percentage.

What you'll see

On the dashboard every link gets a funnel: clicks → conversions and the percentage, and an A/B test gets a per-variant breakdown. The same click can't count one goal twice — duplicates are dropped automatically.

Testing a Figma prototype or a no-code page where you can't add the pixel? Use the target action without code.

How to count conversions: pixel and postback · FunnelLink