EarnedStats Docs

Revenue

Shopify

Send Shopify sales to EarnedStats.

1. Add the webhook

Shopify admin, Settings, Notifications, Webhooks. Create "Order payment" and "Refund create" in JSON with the address below.

Endpoint
https://earnedstats.com/api/webhooks/shopify/YOUR_SITE_ID

Events: orders/paid, refunds/create.

2. The secret

Copy the signing secret Shopify shows under the webhook list. Save it in Settings, Revenue, Shopify.

3. The visitor id

Add the EarnedStats script to your theme (theme.liquid). It saves the visitor id in the cart, and Shopify copies it to the order.