Skip to content

Conversion Tracking

Conversion tracking lets you measure the actions that matter. Not just clicks and pageviews, but form submissions, sign-ups, purchases, and any other event you define.

Attri’s tracking script watches for conversion events on your website and sends them to the analytics pipeline. Conversions are tied to the session, so they’re attributed back to the shortlink and UTM parameters that originally brought the visitor.

The tracking script can detect common conversion patterns out of the box:

  • Form submissions — Standard HTML forms
  • Thank-you pages — Pages matching common patterns (/thank-you, /confirmation, /success)

We’ve tested these detectors across hundreds of sites during development, and they catch most standard setups without any configuration.

Fire a conversion from your own JavaScript whenever something worth counting happens. The event name is conversion; the type says what kind.

// A purchase, with properties you can slice by later
attri('conversion', {
type: 'purchase',
value: 49.99,
currency: 'USD',
})
// A sign-up
attri('conversion', { type: 'signup' })

If you leave out the type, the conversion is recorded as custom.

Any other event name is recorded as an event, not a conversion:

attri('video_play', { id: 7 })

To make an event count as a conversion, give it a conversion_type property.

  • Event names and conversion types are lowercase letters, digits, underscore, dot and dash, up to 64 characters. Anything else is ignored with a warning in the browser console, never silently changed.
  • The names Attri uses itself, pageview, redirect, scroll, form_submit and outbound_click, cannot be sent from your code.
  • Properties are a flat object of up to 20 values: strings (cut at 256 characters), numbers and booleans. Nested objects are dropped. Keep personal data out of them.

Conversions count whether or not the visit started from a short link. They are credited to the visit they happen in, so a visit that arrived through a short link or a tagged campaign carries that source to the conversion.

Conversions are attributed to the shortlink that started the session. If a visitor clicked attri.link/spring-sale and later purchased on your site, the conversion is credited to that link with all its UTM parameters.

This gives you a clear picture of which campaigns and channels drive real results, not just traffic. In our experience, that distinction is what separates useful analytics from vanity metrics (and it’s a distinction most tools gloss over).

  • Conversion events count toward your plan’s usage quota
  • Custom event properties (like value and currency) are available in analytics and exports
  • Conversion data appears on the dashboard within seconds