Web analytics fundamentals
Check your Stripe sales for a page and source before ChatGPT Wallet orders arrive
By Jonas Reed · Nov 18, 2026 · 9 min read
What was announced, and what it leaves open
OpenAI has launched ChatGPT Wallet. The Decoder reported on Nov 13, 2026 that users must be adults with a ChatGPT Pro subscription and an eligible US bank card, and that ChatGPT completes a purchase "either by using a browser on the merchant's existing website" or through a plugin that supports structured actions such as managing the cart. Before each purchase the user sees the items, the total and the card, then approves the payment with a security check such as Face ID or a fingerprint.
Analytics India Magazine adds that the rollout starts with Pro subscribers in the US through OpenAI's Dots personal agent, that the merchant never sees the real card number, and that OpenAI is working with payment providers including Adyen, Checkout.com and Stripe.
For a shop that takes payments through Stripe, the open question is practical. Those two routes leave different traces in your analytics, and neither report says how an agent picks between them on a given site. You can still test your side of it today.
Limits, stated before the steps
- Peeko does not identify a buyer as an agent. It stores no IP address, and a visitor is only a keyed hash of an address and browser string, so there is nothing in your records that says "this was an agent." A sale with a page tells you a page view happened and a token was passed. It does not tell you who or what clicked.
- The rollout is narrow: US only, Pro subscribers only, starting through Dots, with approval on every purchase. At most small shops the expected number of Wallet sales this month is zero.
- So this is a baseline check, not a trend claim. You are measuring your own pipeline now, so that a change later has something to be compared against.
- Whether your analytics script runs inside a browser an agent drives is not something the reports describe. Treat it as unknown and test for both outcomes.
How a page and source can survive a purchase
Peeko attributes a sale without a cookie. The script mints a page token for each page view, and the token is good for 48 hours. When the buyer clicks Buy, your page reads the token and sends it to your server. Your server passes it into the Checkout session as metadata. When Stripe sends the verified checkout.session.completed event, the metadata comes with it, and the sale carries the page and source of the view that produced the token. If any link breaks, the sale is still recorded as revenue and is labeled Unattributed.
Source: Peeko, How to attribute a sale to the page and source that produced it, Oct 22, 2026. Retrieved Nov 15, 2026.
The 48 hour window is longer than a Checkout session can live. Stripe's documentation says a session can expire anywhere from 30 minutes to 24 hours after creation, and 24 hours by default. So a token read at the moment of the click is always fresh when the session is created. The window matters in a different case: an agent that loads your product page and comes back to pay more than 48 hours later has no valid token to pass.
A sale carries a page and source only if all three of these hold:
- A page view ran your script.
- The sale came within 48 hours of that view.
- Your server put the token into the Checkout metadata.
With a browser-driven purchase on your existing site, all three can hold. With a plugin that creates the session itself, the first and third usually cannot, because there is no page view for your script to see. That is a reading of how the pieces fit, not a measurement of any agent.
Step 1: confirm your Checkout code passes the token
Open the code behind your Buy button. The page side reads the token and posts it to your server:
const token = window.peeko?.token?.() ?? null;
const res = await fetch("/api/checkout", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({ token }),
});
const { url } = await res.json();
window.location.href = url;
The server side sets it as session metadata under the key peeko_t:
const session = await stripe.checkout.sessions.create({
mode: "payment",
line_items: [{ price: process.env.STRIPE_PRICE_ID, quantity: 1 }],
success_url: "https://example.com/thanks",
metadata: token ? { peeko_t: token } : {},
});
Two details trip people up. Stripe does not copy session metadata onto other objects on its own, so set payment_intent_data.metadata if you want it on the PaymentIntent, and subscription_data.metadata for subscriptions. And if the script is blocked or has not loaded, token is null: the purchase still completes, just without a label. That second behavior is the one a Wallet purchase would hit on the plugin route.
Stripe allows up to 50 metadata keys, with values up to 500 characters, so one extra key is well inside the limit. Do not put card details or anything sensitive in metadata.
Step 2: count your sales that carry a page
Ask Stripe directly, not Peeko, so you have a number to compare against. Use a restricted read-only key. This lists your completed Checkout sessions with their metadata:
curl -G https://api.stripe.com/v1/checkout/sessions \
-u "$STRIPE_READ_KEY:" \
-d limit=100 \
| jq -r '.data[] | select(.status=="complete") | [.id, .amount_total, .currency, (.metadata | tojson)] | @tsv'
Each row is a session ID, an amount in the smallest currency unit, a currency and the metadata. A row ending in {} has no token. This second command gives you the two counts that matter:
curl -G https://api.stripe.com/v1/checkout/sessions \
-u "$STRIPE_READ_KEY:" \
-d limit=100 \
| jq '[.data[] | select(.status=="complete")] | {sales: length, with_page: ([.[] | select(.metadata | has("peeko_t"))] | length)}'
The limits of this count: it reads one page of 100 sessions, so use starting_after with the last session ID to go further back. It covers Checkout sessions only, so subscription renewals and charges made by hand in the dashboard do not appear.
If with_page is far below sales on a shop that sells through a normal Buy button, fix that first. Payment Links, for example, never pass through your page code, so they will always show an empty metadata object.
Step 3: read the same sales in Peeko
Open the revenue view and compare it to your Stripe count. Or ask the question in words from a terminal or a coding agent, since npx @usepeeko/cli speaks the same MCP endpoint an agent does: "which pages and which sources earned my last ten orders?" The setup for that is in how to give Claude Code or Cursor read access to your traffic. The command and the tool call return the same numbers.
Two rules keep the totals honest. Revenue arrives one of two ways, a window.peeko.revenue call from your own site or a verified Stripe webhook, and Peeko never adds the two together. If you use both, read each one against Stripe separately. The webhook path needs only the signing secret, a whsec_ value that proves an event came from your account. Peeko never holds a Stripe API key. Amounts in different currencies are listed, not converted, so a shop selling in two currencies will see two totals.
The webhook path matters most here. It records a sale whether or not any script ran, which is why a Wallet sale made through a plugin would still appear as revenue. If you want the full account of that split, the post on webhook revenue and page tokens goes through it, and reporting revenue from your site or letting Stripe confirm it explains which of the two to trust when they disagree.
Step 4: break it on purpose
You will learn more from two deliberate failures than from the sales that already work.
First, block the script. Open your shop in a browser with a content blocker that stops analytics, add a product to the cart and start Checkout. Then look at the session in Stripe. Its metadata should be an empty object, because token was null.
Second, create a session with no token at all, using a Stripe test mode key:
curl https://api.stripe.com/v1/checkout/sessions \
-u "$STRIPE_TEST_KEY:" \
--data-urlencode "success_url=https://example.com/thanks" \
-d "line_items[0][price]=$STRIPE_PRICE_ID" \
-d "line_items[0][quantity]=1" \
-d mode=payment
The response will show "metadata": {}. That is all Peeko would have to go on for a session created that way, whoever created it. These two tests show you what a sale with no page looks like in your own data. They do not tell you what an agent would do, and you should not write that they do.
Step 5: read an empty source as unattributed
Here is how to read each kind of row once you have the two counts.
- A page and a named source. A page view ran your script, the token was passed, and the view arrived from somewhere Peeko could name. This is also what a normal human sale looks like. It does not mean an agent bought.
- A page and no named source. The token was passed, but the visit had nothing to name. An agent that opens your URL directly sends no referrer, but so do many people who paste a link. Read it as unknown.
- No page, no source. The sale is Unattributed. The cause could be an agent on the plugin route, a Payment Link, a blocked script, a token older than 48 hours, or a checkout that never passed the token. The row cannot tell you which.
The mistake to avoid is relabeling the last group. An empty source means "unattributed," not "agent." Before Wallet, that group already held every blocked script and every Payment Link, and none of them were agents. If you want a cleaner read on who is behind a visit, what your records can say about the operator of an AI agent covers what is knowable without IP addresses, and it is less than people hope.
Set the baseline and leave it alone
Write down three numbers with today's date: completed sales, sales with a page, and the share with no page. Appending them to a file makes the later comparison trivial:
echo "$(date -u +%F) $(curl -sG https://api.stripe.com/v1/checkout/sessions -u "$STRIPE_READ_KEY:" -d limit=100 | jq -c '[.data[] | select(.status=="complete")] | {sales: length, with_page: ([.[] | select(.metadata | has("peeko_t"))] | length)}')" >> wallet-baseline.log
Run it once now and again at the start of each month. The signal worth acting on is a rise in the no-page share that holds for several weeks while nothing about how you sell has changed. One odd week is noise, and with a feature this new, one odd week is most likely a single order.
If you share product links on X, LinkedIn or in a newsletter, the UTM builder builds tagged links in the browser and stores nothing, which keeps those visits from landing in the unnamed group by accident.
Two outcomes are worth planning for. If your shop shows a page on nearly every sale today, a Wallet sale through your own pages should look the same, and a Wallet sale through a plugin will stand out as one of the few without a page. If your shop already shows most sales with no page, fix the token path first, because Wallet will not make that picture clearer. In both cases the baseline is what lets you say, later and with a number, that the share changed.
For the general method behind all of this, how to attribute a sale to the page and source that produced it is the longer walk through the token and the webhook.