---
title: Node.js and Express integration
description: "Tracks signups and sales from a Node.js and Express backend with @affitor/sdk/server."
type: integration
url: "https://affitor.com/integrations/node-express"
index: "https://affitor.com/llms.txt"
---

# 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](https://affitor.com/docs/api-reference/integrations/node-express)

- Category: Frameworks and auth
- Works with: Express, Stripe or any payment provider, REST API
- Package: @affitor/sdk, in beta
- Docs: [Node / Express guide](https://affitor.com/docs/api-reference/integrations/node-express)

## More integrations

- [Fastify](https://affitor.com/integrations/fastify): Server-side tracking in Fastify
- [Stripe](https://affitor.com/integrations/stripe): Checkout and subscriptions, credited to the partner
- [Polar](https://affitor.com/integrations/polar): Polar sales through the Server API
