Tracking links
Overview
Section titled “Overview”Tracking links are the URLs that connect the outside world to a visual funnel:
| Link | Used by | Purpose |
|---|---|---|
Entrance link /go/… |
The ad, email or post | Starts a visit: captures the traffic source fields, runs the funnel and redirects to the first page |
| Direct link suffix | Ads that must point straight at the page | Lets the page itself report the entrance (no redirect) |
Action link /a/N |
Buttons and links on your funnel pages | Moves the visitor from the current page to the next step |
Conversion postback /pb |
Your shop, checkout or affiliate network, server to server | Reports a sale or a lead with revenue and order id |
Event postback /pb/event |
Same | Reports a numbered custom event (1 to 10) |
All links are served by the amabledata edge worker in your Cloudflare account, on the site’s tracking domain or on the default tracking domain. They are generated on demand and never stored: you can regenerate them at any time and always get the same URLs, and editing the funnel never breaks them (see How funnel tracking works).
- Where: in the Funnel builder, the toolbar button Links, or Get tracking links in the panel of a Traffic node or a Page group.
- Who uses it: anyone with
analytics:readcan generate links; the links themselves are public URLs.
How it works
Section titled “How it works”Base URL
Section titled “Base URL”Every link starts with a base:
| Domain | Base | Example |
|---|---|---|
| Custom tracking domain | https://<your hostname> |
https://track.example.com |
| Default tracking domain | https://<edge host>/s/<site id> |
https://<edge host>/s/st_abcdefghijklmnopqrst |
On a custom tracking domain the site comes from the hostname, the links are shorter and the visitor cookie is first-party on your own domain. On the default tracking domain every path is prefixed with /s/<site id>. Both forms accept exactly the same routes. Setting up a hostname is described in Tracking domains.
Entrance links (/go)
Section titled “Entrance links (/go)”{base}/go/{funnel id}-{traffic source id}[/{node id}[/{page id}]]?{tracking fields}[&c={cost}]{funnel id}-{traffic source id}identifies the funnel and the source, for examplefg_k3j…-ts_q8w…./{node id}(optional) starts the visit at another node than Traffic, for example straight at a page group./{page id}(optional, only after a page group node) forces one page of that group.- The query string carries the tracking fields of the traffic source as
url_param=source_tokenpairs, in this order: campaign, external click id, then the custom fields by slot. Only fields with Append on and a non-empty Source token are added. The source tokens are the ad platform’s own macros ({{campaign.id}},{campaignid},__CAMPAIGN_ID__…), replaced by the platform at click time. c(optional) is the cost of this click (see Cost parameter).
Example for a Meta Ads source on a custom domain:
https://track.example.com/go/fg_k3j2m4n5p6q7r8s9t2v3w4x5y6-ts_a2b3c4d5e6f7g2h3j4k5m6n7p8?campaign={{campaign.id}}&adset={{adset.id}}&ad={{ad.id}}&campaign_name={{campaign.name}}&adset_name={{adset.name}}&ad_name={{ad.name}}&placement={{placement}}&site_source={{site_source_name}}What the edge does when the link is opened:
-
Resolves the site from the hostname or the
/s/<site id>prefix, then the funnel and the traffic source. Any of them unknown, or a malformed id:404 Not found. -
Reuses the visitor of the
vidparameter, else of theamb_fvidcookie, else creates a new visitor. -
Captures the tracking fields of the source from the query string and puts every other parameter in the data buffer (see Data buffer and tokens).
-
Runs the funnel from the entry node to a page or an external URL (see Node types).
-
Records an
entrancetouch with the cost and aviewtouch of the destination (not for bots), updates the visitor’s funnel session and tags, and fires the webhooks of the path in the background. -
Answers
302 Foundto the destination, withcache-control: no-store, and sets theamb_fvidcookie (30 days, HTTP-only,SameSite=Lax, secure on HTTPS).
The destination URL of a page gets:
- the data parameters of the page group and of the page, with tokens resolved;
vid=<visitor id>(always replaced with the current one);n=<page node id>, unless the URL already has annparameter.
An external URL gets its data parameters and, with Append tracking fields and data parameters on, every non-reserved parameter of the click plus vid.
If the funnel offers no destination, the edge answers 502 Funnel unavailable.
Action links (/a)
Section titled “Action links (/a)”{base}/a/{n}{base}/go/{funnel id}/{page node id}/a/{n}{n} is a whole number from 1 to 255. Use the short form behind every call to action of your pages: <a href="https://track.example.com/a/1">Continue</a>. The connections of the page group decide where action n leads (see Page group).
The edge finds the page the visitor is leaving, in this order, so that the link works even without cookies:
-
vidandrn(page node) in the action URL. The tracker adds both automatically to every link whose path ends in/a/<number>and to every link with thedata-amb-actionattribute. -
The referring page: its
vidandnparameters, or a page of the funnel whose URL (without query string) equals the referrer. -
The visitor cookie
amb_fvid, with the page the visitor’s funnel session says they are on. -
Only for the long form, and only when no session is known at all: the funnel and page node written in the path. The visitor is new in that case and the touch is recorded as
actioninstead ofclick.
Then the edge reuses the campaign, click id and tracking fields captured at the entrance, runs the funnel from the page’s exit for action n, records a click touch on the page and a view of the next destination, and redirects (302) exactly like an entrance. The URL parameters of the action link itself (other than reserved ones) feed the data buffer of this step.
No page can be found: 404 Not found. The action has no exit: 502 Funnel unavailable.
Direct links
Section titled “Direct links”Some platforms reject redirects as the ad destination. Point the ad at the page itself and add the Direct link suffix as its URL parameters:
https://www.example.com/lander?f={funnel id}&ts={traffic source id}&n={page node id}[&p={page id}]&{tracking fields}f,ts,nidentify the funnel, the source and the page group;pidentifies the page when the group has more than one page (or when you chose one).- Turn on WordPress page in the link builder to leave
pout: WordPress usespfor post ids. - The page must run the amabledata tracker (the Universal JavaScript). When it sends the pageview, the edge records the
entrance(with the cost ofcor the default cost) and theviewitself, and creates the funnel session. Rotators and conditions placed before the page do not run: the visitor is already on it. - A landing that already carries
vid(it came through a redirect) is not counted again.
Universal JavaScript
Section titled “Universal JavaScript”The link builder shows the tracker snippet of the site, built on the selected domain:
<script>window.amable=window.amable||function(){(window.amable.q=window.amable.q||[]).push(arguments)};</script><script defer data-site="st_…" src="https://track.example.com/s.js"></script>Hint: “Paste it once on every page of the funnel: it records views and decorates action links.” On a funnel page it:
- reads the funnel context of the landing URL (
f,ts,n,p,vid) and keeps it while the visitor browses in the same tab (the cookieless build keeps it for the current page only); - sends it with every event, so the edge can join the page’s pageviews, goals, forms and payments to the funnel visitor;
- adds
vidandrnto the action links, including links added to the page later.
You can also set the context yourself with amable('context', { f: 'fg_…', ts: 'ts_…', n: 'n3', p: 'p1', vid: '…' }). Installation options are covered in Install the tracker and Tracker protocol.
Cost parameter (c)
Section titled “Cost parameter (c)”The cost of each entrance is taken from, in this order:
- the
cparameter of the link: a decimal amount in the site currency (c=0.25), or a per-thousand amount writtencpm_<amount>(c=cpm_12.34= 0.01234 per entrance). Up to 9 digits before and after the decimal point. A platform macro the platform did not replace counts as missing; - the Default cost per entrance of the traffic source, unless its cost type is No cost;
- the default cost of the funnel (set through the API,
default_cost_minor); - otherwise no cost.
The Cost modifier of the source is then applied (10 = +10%). See Traffic sources. Reports prefer the spend synced from ad platforms when it exists for the period (see Ad spend sync).
Conversion postback (/pb)
Section titled “Conversion postback (/pb)”Your shop or network calls this URL server to server when a conversion happens:
{base}/pb?hit={hit}&rev=49.90&tx=ORDER-1001The edge answers 200 ok when the conversion is recorded (or ignored on purpose), with cache-control: no-store.
Which hit converted. Pass {hit} to the offer page (as a data parameter, see Data buffer and tokens) and send it back as hit: it identifies the exact view of the page, hence the visitor, the funnel, the page, the traffic source and the campaign. Without a hit you can send vid (the visitor id), optionally with p (a page id): the edge then credits the visitor’s latest view of that page, else the latest view of an Offer page in the visitor’s latest funnel, else the latest view.
| Parameter | Description |
|---|---|
hit |
Hit id received through the {hit} token (letters, digits, _, -, up to 128 characters). Required unless vid is given. |
vid |
Visitor id, when no hit is available. |
p |
Page id, to pick the page of a vid postback. |
rev |
Revenue in major units of the site currency, for example 49.90. Default 0. -1 means rejected. |
tx |
Order or transaction id, up to 255 characters. Part of the deduplication key. |
event |
sale (default) or lead. |
status |
pending, hold or preapproved record a pending conversion with a provisional revenue of 0.01; rejected, reject, trash, cancelled or canceled reverse an existing conversion (and never create one); anything else (or nothing) is approved. |
rev_share |
Percentage 0 to 100 applied to rev: rev=200&rev_share=30 records 60. |
conversion_time |
When the conversion happened, in Unix seconds (up to 10 digits) or milliseconds. Ignored (the reception time is used) when it is before the hit or in the future. |
event_data1, event_data2 |
Free values (up to 512 characters) stored with the conversion. |
disable_postbacks |
1 or true: record the conversion but do not send it to the ad platform. |
consent |
0: the visitor did not consent; the conversion is recorded but not sent to the ad platform. |
pii_email (or email), pii_phone (or phone), pii_ip, pii_ua (or pii_user_agent) |
Customer data that improves matching on the ad platform. Never stored with the conversion: it only travels with the pending outbound job, hashed before it leaves, and is dropped once the job is done. |
Deduplication. A conversion is unique per hit, event and tx. Calling the postback again with the same three values updates the same conversion (status, revenue, time) instead of creating a new one, so retries are safe and a pending conversion can later be approved or rejected with the same tx. Different tx values on the same hit are separate conversions (upsells, rebills).
Sending back to the platform. Approved conversions without disable_postbacks are queued for the ad connection of the traffic source, if it has one and the event is mapped (see Traffic sources). Pending conversions are sent once approved. The queue, retries and gates are described in Outbound conversions.
Example sequence for a network that approves sales later:
GET https://track.example.com/pb?hit=k2m3n4p5q6r7s8t9v2w3x4y5z6&rev=35&tx=A-778&status=pendingGET https://track.example.com/pb?hit=k2m3n4p5q6r7s8t9v2w3x4y5z6&rev=35&tx=A-778&status=approvedEvent postback (/pb/event)
Section titled “Event postback (/pb/event)”{base}/pb/event?hit={hit}&e=3Records the numbered custom event e (1 to 10; num is accepted too) for the hit. It takes the same hit, vid, p, rev, status, rev_share, conversion_time, event_data1, event_data2, disable_postbacks, consent and pii_* parameters, but no tx and no event: each custom event is recorded once per hit (a repeat updates it). Custom events can be mapped to platform events like sales and leads.
Step by step
Section titled “Step by step”Generate links in the builder
Section titled “Generate links in the builder”-
Save the funnel, then click Links in the toolbar (or Get tracking links in a node panel).
-
Pick the Traffic source. With no active source the dialog shows “No traffic sources yet.” and a Create one link to Traffic sources.
-
Pick the Entry node (default: the traffic node; any node except external URLs). For a page group, pick a Page or keep Rotate the pages of the group.
-
Pick the Domain: Default tracking domain or one of the site’s active tracking domains.
-
Optionally type a Cost per entrance:
0.25,cpm_12.34or a cost macro of the platform (letters, digits and_ . - { } [ ], up to 64 characters). Empty = default cost. -
Turn on WordPress page if the page runs on WordPress.
-
Copy what you need with the copy buttons: Entrance link (redirect), Direct link suffix, Full direct URL (for testing), the Action links of the page (and their fallback with Copy fallback) and the Universal JavaScript. Close closes the dialog.
The direct link and the action links belong to the first page group reached from the entry node through traffic, action proxy, tag and webhook nodes. When the entry node leads to a rotator or a condition first, there is no single page and the dialog says “No page reachable from this node: no direct link.” Action links list every action number of the page group’s connections (action 1 when it only has a default exit).
Wire a two-step funnel
Section titled “Wire a two-step funnel”-
Put the Entrance link (redirect) in the ad.
-
On the lander, point the main button at the Action 1 link:
https://track.example.com/a/1. -
On the offer page group, add a data parameter
clickid={hit}, so the checkout receives the hit id (hititself is a reserved key). -
In the checkout, store the
clickidwith the order and callhttps://track.example.com/pb?hit=<stored clickid>&rev=<order total>&tx=<order id>when the order is paid. -
Paste the Universal JavaScript on the lander and the offer.
Reference
Section titled “Reference”Responses
Section titled “Responses”| Route | Status and body | When |
|---|---|---|
/go/…, /a/… |
302 |
Redirect to the destination |
/go/…, /a/… |
404 Not found |
Unknown host, funnel, source or node; malformed ids; action number outside 1–255; no page to start the action from |
/go/…, /a/… |
502 Funnel unavailable |
The funnel offers no destination |
/pb, /pb/event |
200 ok |
Recorded, updated, or a rejection with nothing to reverse |
/pb, /pb/event |
400 invalid hit |
hit has characters other than letters, digits, _, - or is longer than 128 |
/pb, /pb/event |
400 hit or vid required |
Neither is given (or vid is malformed) |
/pb, /pb/event |
400 invalid p |
Malformed page id |
/pb |
400 invalid event |
event is not sale or lead |
/pb |
400 invalid tx |
tx longer than 255 characters |
/pb/event |
400 invalid event number |
e missing or not 1–10 |
/pb, /pb/event |
400 invalid rev |
Not a number, or negative on an approved conversion (other than -1) |
/pb, /pb/event |
400 invalid rev_share |
Not a number from 0 to 100 |
/pb, /pb/event |
404 unknown host |
The hostname or site is unknown, or the site was deleted |
/pb, /pb/event |
404 unknown hit |
No touch with that hit, or no view for that visitor |
Link builder fields
Section titled “Link builder fields”| Field | Description |
|---|---|
| Traffic source | Active sources of the site |
| Entry node | “<label> · <node id>” of every live node except external URLs |
| Page | Shown for page groups: one page, or Rotate the pages of the group |
| Domain | Default tracking domain or an active custom tracking domain. A domain that is not active is refused (tracking_domain_not_active). |
| Cost per entrance | Optional; “Letters, digits and _ . - { } [ ] only (max 64).” when invalid |
| WordPress page | “Leaves the page parameter out of the direct link (WordPress uses it for post IDs).” |
The same data is available from GET /api/v2/t/<workspace>/analytics/funnels-v2/<funnel id>/links with site_id, source, and optionally node, page, domain, cost and wordpress=true (permission analytics:read). The answer has base_url, entrance_url, direct_suffix, direct_url, page_node_id, action_urls (action, url, default_url) and snippet. See REST API.
Limits and permissions
Section titled “Limits and permissions”- Generating links needs
analytics:read; the link routes and postbacks are public and need no key: they only accept the ids of your own site. - Action numbers 1 to 255; custom events 1 to 10.
- Up to 50 URL parameters per click enter the data buffer; values are cut at 512 characters (campaign at 255).
- Postbacks only accept
GET.
Troubleshooting
Section titled “Troubleshooting”| Symptom | Cause | Fix |
|---|---|---|
404 Not found on an action link |
The page was opened without vid, the referrer was stripped and there is no cookie |
Install the Universal JavaScript (it adds vid and rn), or use the fallback /go/<funnel>/<node>/a/<n> form |
| The action opens the wrong next page | The visitor’s session points at another page (for example they opened two tabs) | Keep the tracker on every page: its rn always names the page the click comes from |
404 unknown hit on postbacks |
The hit was not passed through, belongs to another site, or the touch expired (anonymous touches are kept 90 days) |
Send the {hit} received on the offer page, on the same domain or site |
| Revenue counted twice | The same sale was sent with two different tx |
Always send the same order id for the same order |
| A rejection does nothing | No conversion exists with that hit, event and tx |
Use the same tx as the original postback |
| Direct-link visits are missing | The page has no tracker, or the suffix lost f or ts |
Paste the snippet and the full suffix |

