Node.js and Express
Tracks signups and sales from a Node.js and Express backend with @affitor/sdk/server.
What it does
- A script tag on your frontend stores the click in a first-party cookie.
- Your server sends each lead and each sale, with your own user ID.
- Sales come from Stripe, or from your payment webhook with any provider. Refunds too.
Set up in three steps
- Add the Affitor script tag with your program ID to every page of your frontend.
- Send the click ID with your signup form, and call
trackLeadwhen you create the user. - Connect Stripe and add Affitor metadata to the Checkout Session, or call
trackSalefrom your payment webhook.