# Track where your sales come from

Source: https://pozy.ai/help/analytics/track-sales

See which post, short link or source each Stripe sale came from. You add your website and a small script, and Pozy matches every payment to the visit behind it.

## Set it up

1. Open **Analytics**, then **Sales tracking**, and pick the project.
2. Under **Your website**, type your site, like yourshop.com, and choose **Add website**. Keep **Tag links in my posts** on.
3. Under **Add the script to your site**, copy the script tag into the head of every page. Or choose **Copy setup prompt for your AI agent** and paste it into Claude Code, Cursor or Codex in your site's code. It adds the script and connects your checkout for you.
4. Open your site once. The page then says **Receiving visits**.
5. Under **Connect your sales**, connect [Stripe](https://pozy.ai/help/inputs/stripe-and-paddle) if it is not connected yet. If it says your key **cannot read Checkout Sessions**, edit the key in Stripe, set **Checkout Sessions** to **Read** and save.
6. Choose **Match sales now**, or wait for the next morning. Pozy matches your sales every day.

## Check it works

Open your site, then look at the browser's Network tab: a request to pozy.ai/api/t answers 204. On the Sales tracking page, the script step shows a green tick.

## What Pozy does with your links

- **Links in your posts.** When you publish through Pozy, links to your website get `?pz=` and UTM tags, so each visit is tied to its post. Links you already tagged keep your tags. Links to other sites are not touched.
- **Short links.** Under **Short links**, make a pozy.ai/l link for your bio, a DM, a comment-to-DM reply, a podcast or a newsletter. Pick where you use it. Each click is counted, and the sales after it are credited to the link. A short link can also open a Stripe payment link straight away.
- **Stripe Payment Links.** The script adds the visitor to a buy.stripe.com link when someone clicks it, so the payment is matched exactly.

## How a sale is matched

Pozy looks for the buyer in this order, and shows which one it used:

1. The checkout carries the visitor (the script did it, or your code added `pozy_vid` to the session metadata).
2. The buyer came back to your thank-you page with `?session_id=` in the address.
3. The same Stripe customer paid before (renewals and second orders).
4. The buyer's email was passed to `pozy("identify")` when they signed up.
5. Only one visitor clicked a checkout link in the 3 hours before the payment.

The sale goes to the buyer's last visit from a real source. So "tapped the post, came back directly a week later and paid" counts for the post.

## Read the results

Open **Analytics**. **Where sales come from** shows sales, orders and visitors by **Source** (Instagram, Google, ChatGPT...), **Channel**, **Post**, **Short link** and **Campaign**. Under it, a line says how many sales Pozy could trace, and why not the others.

## Or ask your AI

> Which posts brought sales this month on my Pozy project, and how much? Then make two more posts like the best one.

## Good to know

- Pozy counts what it can see. Ad blockers can block the script, and Safari forgets a visitor after 7 days without a visit. Payments are still all counted, from Stripe, even when the visit is not.
- Sales made before the script was on your site cannot be tied to a visit.
- Only Stripe sales are matched for now. Paddle and Clover sales show in **Analytics**, without a source.
- The script uses two first-party cookies and sends no personal data. An email passed to identify is turned into a code that cannot be read back, and the email itself is not stored.
- To leave your own visits out, open your site once with `?pozy_ignore=true` at the end of the address.
- Google Analytics reads the same UTM tags, so posts also show as campaigns there.

**Related:** [Your numbers](https://pozy.ai/help/analytics/your-numbers) · [Track link clicks and watch a post](https://pozy.ai/help/analytics/link-tracking) · [Connect Stripe or Paddle](https://pozy.ai/help/inputs/stripe-and-paddle)
