Conversion tracking
Track conversions with one script tag: the dia.js SDK
dia.js is directinapp's drop-in JavaScript SDK, served at /dia.js. Add one async <script> tag with your slug baked in, then either call dia('purchase', { value: 499, currency: 'INR' }) in code or add data-* triggers to a button so it fires on click. It auto-reads the dia_clid for you and fires the same /c pixel a hand-placed image tag would, so there are no pixel URLs to assemble by hand.
How does the dia.js conversion tracking SDK work?
dia.js is a drop-in script served at /dia.js. Add one async <script> tag with your slug, then call dia('purchase', { value: 499, currency: 'INR' }) or add data-* triggers to a button. It auto-reads the dia_clid and fires the same /c pixel — no hand-built pixel URLs.
Why it matters
One script tag, no hand-built pixel URLs
Instead of hand-assembling a /c?s=SLUG&e=purchase&v=499&cur=INR URL on every page and every event, you add one async <script> tag with your slug baked in. dia.js knows your slug, reads the dia_clid, and builds the pixel call for you. You just say what happened — a purchase, a signup, a lead — and it fires.
Programmatic or declarative, your choice
Call dia('purchase', { value: 499, currency: 'INR' }) from your JavaScript the moment a payment succeeds, or add data-* attributes for the event, value and currency to a button so it fires on click with no code at all. Single-page apps and plain server-rendered thank-you pages are both covered. Use whichever fits the page you already have.
Same pixel, same reports, in rupees
dia.js fires the exact same GET /c pixel as a hand-placed image tag, so nothing new is stored and there is no second system to reconcile. Your Conversions tab shows the count, rupee value and conversion rate per link, plus a per-event breakdown, timeseries and a feed with click and visitor columns. Totals are kept per currency (INR, USD, EUR, GBP, AED) and never blindly summed across currencies.
Set it up
Three steps, no developer
Add the dia.js script tag with your slug
On any page you control, paste one line before </body> or in the <head>: <script async src="https://api.directinapp.com/dia.js" data-slug="YOUR_SLUG"></script>. Replace YOUR_SLUG with the slug of the link you are measuring. That single tag loads the SDK and wires it to your link — nothing else to install.
Fire the event — in code or with data-*
When a sale completes, call dia('purchase', { value: 499, currency: 'INR' }) from your JavaScript. Prefer no code? Add data-* attributes for the event name, value and currency to a button, and dia.js fires the conversion on click. Either way it auto-reads the dia_clid and posts the same /c pixel for you.
Read the numbers in Business
Run one real conversion so dia.js fires, then open the Conversions tab to see the count, rupee value, conversion rate, per-event breakdown, timeseries and a feed of every sale with click and visitor columns. Ingestion is always on for every link on every plan, so nothing is lost while you set up. Viewing the reports needs the Business tier, and the free early-bird month is full Business at no cost.
dia.js event
a sale happens
directinapp
records it
Frequently asked questions
What is the dia.js SDK?+
dia.js is directinapp's drop-in JavaScript SDK for conversion tracking, served at /dia.js. You add one async <script> tag with your link's slug, then either call dia('purchase', { value, currency }) in code or add data-* triggers to a button. It auto-reads the dia_clid and fires the same /c pixel a hand-placed image tag would, so you never assemble pixel URLs by hand.
How is dia.js different from placing the pixel by hand?+
Same result, less plumbing. A hand-placed pixel means building a /c?s=SLUG&e=purchase&v=499&cur=INR URL for every event and page. dia.js bakes the slug into the script tag, reads the dia_clid for you, and turns a sale into one function call or a data-* attribute. Under the hood it fires the exact same /c pixel, so your reports are identical.
Do I need a developer to use dia.js?+
For the data-* triggers, no — you paste the script tag and add attributes to a button, with no JavaScript required. For the programmatic call, dia('purchase', { value: 499, currency: 'INR' }), you need someone who can add one line to your success handler, which is a small change on most sites. Both are simpler than hand-building pixel URLs.
Does dia.js track visitors across devices?+
dia.js reads the dia_clid click id and works with the first-party, cookie-scoped dia_vid visitor id, so each conversion ties back to the click and the browser that drove it (when attribution is enabled on your account). Because dia_vid is cookie-scoped to one browser, it does not recognise the same person across their devices — cross-device identity stays on the roadmap.
Does dia.js work in a single-page app like React or Vue?+
Yes. Because you fire conversions with a function call, dia('purchase', { value: 499, currency: 'INR' }), you can invoke it after a client-side route change or an async payment confirmation, where a static pixel on a thank-you page would never load. On a plain server-rendered thank-you page, a data-* trigger or a hand-placed pixel works just as well.
Is dia.js a native store or checkout plugin?+
No. dia.js is a script you add to pages you control, not a native one-click store or gateway app, and it never touches your Razorpay keys or checkout. If you would rather add no code to your success page at all, connect signed webhook auto-capture for Razorpay, Stripe, Shopify or WooCommerce and a paid order records a conversion automatically. dia.js and the webhook auto-capture both ship today.
More on conversion tracking
directinapp Business
The full conversion-tracking product — pricing, setup and a live demo.
Conversion tracking
Conversion tracking is measuring the real outcomes a link drives — a sale, a signup, a lead — not just the clicks. You tell your analytics tool "this counts as a conversion, worth this much," and it ties that outcome back to the link that earned it. directinapp does this on every link: fire a pixel, a postback or our drop-in dia.js script when a sale happens, and see the count, the rupee value and the conversion rate for that exact link — right down to which click and visitor drove it.
Instagram sales tracking
Yes — you can track sales and signups from an Instagram bio link or reel. Put your store or checkout behind a directinapp link, fire our pixel on your payment success page, and the Business report shows the count, rupee value and conversion rate that link drove. Even though a bio or reel is one shared link, per-visitor and per-click attribution shows which visitor and which click drove each sale — the visitor id is cookie-scoped to this browser, not the same person across devices.
vs Linktree
Linktree tells you a link got clicked. directinapp tells you it drove 12 purchases worth Rs 5,988. On any link you can fire our tracking pixel or server postback with a sale value, and the Business tier shows conversion count, total value and conversion rate per link, per currency (INR/USD/EUR/GBP/AED). Attribution now runs per-click and per-visitor (dia_clid and dia_vid), and signed webhook auto-capture for Razorpay, Stripe, Shopify and WooCommerce records a paid order automatically.
Tracking pixel
A tracking pixel for links is a tiny 1×1 image you load when a sale happens. Point an img tag at GET /c?s=SLUG&e=purchase&v=499&cur=INR and directinapp records one conversion — with its rupee value — against the link that drove it. No SDK, no cookie, no code beyond one line of HTML.
Server postbacks
A server postback records a conversion by sending a POST /conversions call from your backend to directinapp. You send JSON with the link's slug, an event name, value and currency, and the dashboard shows counts, total value and conversion rate per link. It is shipped and works today. Signed, HMAC-verified postbacks are on the roadmap.
Lead tracking
Yes — you can track leads and signups from any directinapp link today. Fire a "lead" or "signup" event from your form's thank-you page with our pixel or postback, and each link shows its lead count, conversion rate, and a per-event breakdown. Attribution ties each lead to the click and the visitor — a cookie-scoped id for this browser — that drove it; recognising the same person across devices is still on the roadmap.
Stop losing clicks at the browser
Create your first smart link in under a minute and see where every tap really goes.
Start freeNo credit card required · 7-day free trial