How it works
Analytics connections let a web analytics tool (like Nahnu Analytics) see which visits to a website came from your short links. They have three parts: a click ID on the way in, a small bridge script on the website, and a read-only site API for the analytics tool’s server.
The flow#
sequenceDiagram
participant V as Visitor
participant E as Edge script
participant W as Website + bridge script
participant A as Analytics tool
V->>E: Clicks go.brand.com/spring
E->>E: Counts the click, makes a click ID
E->>W: 302 to brand.com/sale?nlc=K3v9QpX2aB7mN1zR
W->>W: Bridge keeps the ID, removes ?nlc= from the address
W->>A: nahnulinks:click event (link details)
A->>E: Site API: GET /api/site/click/{id}
E-->>A: Country, device, A/B route… - Someone clicks a short link that leads to a connected website. The edge script gives the click a random 16-character ID and sends the visitor to the destination with
?nlc=<id>. - The bridge script on the website takes the ID out of the address bar, keeps it for that browser tab (
sessionStorage, no cookies) and fires anahnulinks:clickevent with the short link’s details. - The analytics tool records the visit with the link, and can read the click itself (country, device, A/B route) from the site API.
Click IDs are added only for connected websites, unless you turn them on for every link.
Who does what#
| Part | Knows |
|---|---|
| Nahnu Links | The click: which link, where, what device, person or bot, which rule. |
| The analytics tool | The visit: pages, goals, events, revenue. |
| The click ID | Joins the two. |
Privacy by design#
- Bots never get a click ID.
- The click ID is random and holds no personal data.
- No cookies are used; the ID lives only in the browser tab.
- The original referrer (like instagram.com) still reaches the website, because the redirect is a normal 302.
- Each connection’s key only sees links to its own websites.
Two kinds of connection#
| Kind | Made by | Covers |
|---|---|---|
| Agency | You, under Settings > General > Analytics connections | Every client’s links to the websites you list, plus an optional live feed |
| Client site | Nahnu Links Client, by itself | Only that client’s links to their own website |


