03 · Revenue
Connect WooCommerce and link each order to its visit
Tally reads your store's paid orders and refunds, and links each one by the order-received page. Approve it in WooCommerce, or paste a key.
01Connect in one click
On your site's Integrations page, open WooCommerce. Under Connect in one click, type your store's address and press Approve in WooCommerce.
Tally says what it will be given: it reads your orders and refunds, adds two webhooks, and never changes an order. Press Continue to WooCommerce.
WooCommerce opens on your store and says Tally would like to connect to your store. Sign in if it asks (as an administrator or shop manager) and press Approve.
You're back on Integrations: WooCommerce is connected, and the past 365 days are being imported.
With the WordPress plugin on your store, its Connect WooCommerce to Tally button starts the same approval.
02Or connect with a REST API key
Create a REST API key in WooCommerce
Tally only reads your orders and refunds; the only thing it writes is its own two webhooks. In your WordPress admin, open WooCommerce › Settings › Advanced › REST API and choose Add key: pick your user, set Permissions to Read/Write and generate it (WooCommerce's guide). This is all Tally does with it:
Permission Access Why Orders Read Every paid order: its amount and tax, and the customer's email (hashed at once, never stored). Names and addresses are never stored. Refunds Read When each refund happened, and how much tax it gave back. Webhooks Write Tally adds its own two webhooks (order created, order updated), so sales arrive within seconds. It writes nothing else. Read/Write is only for adding the webhooks: Tally never changes an order. Revoke the key in the same place at any time.
Paste the REST API key
On your site's Integrations page (or the Payments step when you add a site), open WooCommerce and fill in:
- Store address: As it appears in the browser. WooCommerce takes keys over HTTPS only.
- Consumer key: Shown once, with the secret, when the key is made. Tally stores both encrypted and never shows them again.
- Consumer secret: It starts with cs_.
Then press Connect WooCommerce.
Tally checks it and imports the past year
It checks the key against your store, adds its own two webhooks so new orders arrive as they happen, and imports the past 365 days, refunds included. Every 30 minutes it also reads the orders that changed, so a delivery WooCommerce couldn't make is never lost. With Tally's snippet on the store, the order-received page ties each order to its buyer's visit.
03What Tally reads and keeps
- Two webhooks,
order.createdandorder.updated(which also fires for refunds), bring new orders within seconds. Every 30 minutes Tally also reads the orders that changed and turns a switched-off webhook back on: WooCommerce never retries a delivery, and switches a webhook off after five failures in a row. - An order is a sale once it's paid: processing, completed, refunded, or with a paid date. Pending, on-hold and failed orders aren't sales. Its amount is the total less tax, in the order's currency; each refund counts at its own time.
- What's kept of an order: amounts, dates, status, the refunds' ids, the visitor's id, and hashes of the order key and the billing email. Names, addresses, phone numbers, IP addresses and line items are never stored.
- WooCommerce Subscriptions' renewal orders are orders like any other: each is a sale, linked by its own evidence.
04Tie each order to its visit
Put the snippet on every page of the store, the order-received page included (your theme's header, or a plugin that adds code to the head of each page). When a buyer lands on that page, the order is tied to their visit, with nothing else to add to WooCommerce. It works in every mode, cookieless included.
<script defer data-site="k3xq2mfa7twp" src="https://t.tallybyoutpost.com/script.js"></script>For buyers who never reach that page (a gateway that doesn't send them back), save the visitor's id on the order at checkout. These lines work with classic and block checkout:
// Your theme's functions.php, or a code snippets plugin: saves the visitor's id on the
// order at checkout, for buyers who never reach the order-received page.
function tally_save_visitor_id( $order ) {
$id = isset( $_COOKIE['_tally_vid'] ) ? $_COOKIE['_tally_vid'] : '';
if ( preg_match( '/^[A-Za-z0-9_-]{8,64}$/', $id ) ) {
$order->update_meta_data( 'tally_visitor_id', $id );
}
}
add_action( 'woocommerce_checkout_create_order', 'tally_save_visitor_id' );
add_action( 'woocommerce_store_api_checkout_update_order_meta', 'tally_save_visitor_id' );
05Disconnecting
Disconnect on the Integrations page: Tally removes its webhooks from the store, and the orders already imported stay, with their receipts. It can't delete the REST API key itself, so revoke that in WooCommerce › Settings › Advanced › REST API.
06Check it worked
07What isn't read
Something missing, or not what you see? Write to support@tallybyoutpost.com and say which page.