Skip to main content
When you finish, every Commas payment arrives in Events as revenue, linked to the ad click that started it. Commas was formerly FanBasis.

What Commas sends

DATALYR creates the Commas webhook for you. It subscribes to four Commas events. Every other delivery writes nothing. A won dispute moves no money, so it writes nothing too. The event value is the Commas amount in dollars, gross. DATALYR records no value when amount is missing, negative, or above 1000000. Currency is the Commas currency, or USD when the delivery has none. Refund and chargeback amounts are positive. They are separate metrics, and no report subtracts them from revenue. See Refunds. The event ID comes from the Commas payment, refund, or dispute ID, so one payment is one row however many deliveries describe it.
Commas sends each webhook once and does not retry it.

Before you start

Connect Commas

1

Create an API key

In the Commas dashboard, open Account → API Keys. Create a key with the webhooks and payments scopes.
2

Open the Commas card

In DATALYR, open Sources. On the Commas card, select connect.
3

Paste the key

Paste the key into API key. Select Connect Commas.
DATALYR creates the webhook in your Commas account and stores its signing secret. Every delivery is checked against that secret. Do not delete the DATALYR webhook in Commas. Without it, no payment reaches DATALYR. To recreate it, disconnect and connect again.

How payments match to ad clicks

DATALYR checks these in order and stops at the first one that finds an ad click. If you create checkout sessions through the Commas API, add dl_vid to the session metadata. Read the value with datalyr.getVisitorId() in the buyer’s browser. Commas returns the metadata on every webhook under api_metadata.data. DATALYR also reads these keys from the same metadata: utm_source, utm_medium, utm_campaign, utm_content, utm_term, fbclid, gclid, ttclid, fbc, fbp. Without dl_vid, the buyer email does the match. A buyer who booked through iClosed or Calendly with the same email matches that way. With no match, visitor_id is commas_ plus the Commas buyer ID.

Set up conversion rules

Select the flag icon on the connected Commas card to open the starter rules. Both send the payment amount as the value and the DATALYR conversion ID as the order ID. There is no refund rule, because refunds arrive positive. If an iClosed deal_won rule already sends Purchase to the same pixel, leave the Commas purchase rule off. Each rule delivers separately, so Meta counts the sale twice.

Verify

  1. Open your sales page in a private window with ?utm_source=doctest.
  2. Buy a low-priced test product with a test email address.
  3. Open Events. Find the purchase row with source commas.
  4. Confirm value, currency, and event_data.order_id.
  5. Confirm utm_source reads doctest.
  6. Refund the payment in Commas. Confirm a refund row arrives.

When it does not work

Next

  • iClosed: send the booked call and the won deal before the cash arrives.
  • Subscriptions: how installments and renewals show in reports.
  • Conversions: read a delivery row.