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

  1. Add the Affitor script tag with your program ID to every page of your frontend.
  2. Send the click ID with your signup form, and call trackLead when you create the user.
  3. Connect Stripe and add Affitor metadata to the Checkout Session, or call trackSale from your payment webhook.

Read the full guide: Node / Express guide

More integrations