Track buttons and links
Attri already knows where visitors come from and what they do on your pages. These two attributes let you say which elements on the page matter, so the dashboard can tell you which button, on which page, produced a signup or a sale.
Route a link through a short link
Section titled “Route a link through a short link”Add data-attri-link to any link that leaves your site, for example a “Start free” button that goes to your app. The value is the slug of a short link in your workspace.
<a href="https://app.example.com/signup" data-attri-link="start-pricing">Start free</a>When someone clicks, Attri sends them through yourdomain/start-pricing instead. The short link records the click, carries a click id into the destination, and the click shows up in your dashboard under that slug, with the sessions and conversions that followed it. Because the identity rides on the link, this works across domains, from a marketing site into an app, with no cookies involved.
The link’s real destination stays in the HTML, so search engines and visitors without JavaScript follow it as usual. Command-click, middle-click and copy-link keep working too. If the slug does not exist yet, the click still reaches the original destination.
Create the short link first, in Links, with the same destination and the slug you put in the attribute. One link per placement is the point: start-nav, start-pricing, start-blog-post, so the funnel reads like your site.
To use a domain other than your workspace’s primary one, put it in the value: data-attri-link="go.example.com/start-pricing".
Fire an event from anything
Section titled “Fire an event from anything”Add data-attri-event to any element that does not navigate, such as a button, a tab or a video control. The value is the event name. Any data-attri-prop-* attribute becomes a property.
<button data-attri-event="pricing_toggle" data-attri-prop-plan="pro">Monthly</button>Each click sends a custom event. It is attributed to the visit it happens in, so an event inside a visit that arrived through a short link or a tagged campaign counts for that source.
Outbound links are tracked automatically
Section titled “Outbound links are tracked automatically”Every click on a link that leaves your site is recorded without any attribute: the destination (its address without any query string, apart from UTM tags), the link text, and where on the page the link sat. They show up under Pages → Outbound links, and in the Pages card on the Site dashboard. Links carrying data-attri-link are recorded by the short link instead, so nothing is counted twice.
- Both attributes can sit on the same element. The event fires, then the link routes.
- Attributes survive any framework or page builder and work under a tag-manager install.
- Custom events count as conversions once they carry a conversion type; see Conversions.