Shops: products, baskets and orders
For a shop, every order is joined to what the buyer looked at first and to the post, video or advert that brought them. You see what sold, for how much, and which content sold it.
What is recorded by itself#
- Products looked at. Most shops publish each product for Google as structured data (schema.org
Product, which Shopify, WooCommerce, Wix and most themes add for you). The snippet reads it and sends aview_contentwith the product’s id, name, category, brand and price. - Searches. A search results page with
?q=,?s=,?search=,?query=or?keyword=in its address sends asearchwith what was searched for. - Page views, forms begun and sent, and WhatsApp, call and email presses, as on any site.
Baskets and checkout#
One line each, where they happen. Each item needs its id; the rest helps your reports and the ad platforms.
JavaScript
optiq("track", "add_to_cart", {
items: [{ id: "SKU-42", name: "Running shoes", category: "Shoes", price: 1500, quantity: 1 }],
value: 1500,
currency: "GMD",
});
optiq("track", "begin_checkout", { value: 2000, currency: "GMD", items: basket.items });Orders#
Send each order with its id, what was paid and what was bought. Send it from your server too where you can (a browser can be closed before it leaves): with the same event_id it counts once.
optiq("track", "purchase", {
order_id: "ORD-1001",
value: 2000,
currency: "GMD",
items: [
{ id: "SKU-42", name: "Running shoes", category: "Shoes", price: 1500, quantity: 1 },
{ id: "SKU-7", name: "Sports socks", category: "Accessories", price: 250, quantity: 2 },
],
coupon: "NOV10",
shipping: 100,
payment_method: "wave",
});| Field | Type | Description |
|---|---|---|
| valuerequired | number | What was paid, in currency. |
| currencyrequired | string | Three letters: GMD, USD, EUR and so on. |
| items[].idrequired | string | Your product id (SKU), the same as in the product's page data. |
| items[].name, category, brand, variant | string | What it is. |
| items[].price, quantity | number | Each, and how many. |
| order_id, coupon, shipping, tax, payment_method | property | Kept with the order and shown with it. |
What you see#
On the Funnel page, for the company’s owners and admins and for DaveLabs:
- The content that sold: each post, video, tracked link or advert, with its orders, buyers and revenue. An order counts for the link pressed last before it (within seven days); the first one is kept beside it.
- What they bought: each product, how many sold, in how many orders, for how much.
- Looked at, not yet bought: products viewed and put in baskets against those bought, where interest does not yet become a sale.
- Latest orders: each with its items, what was paid, and the content that converted the buyer.
Key point: Send the orders to your Meta and TikTok as well (Send conversions to Meta and TikTok): their ads then count each sale and find more people like your buyers.
Last updated 2026-11-04 UTC. The SDK is open source under the MIT licence. Tell us what is missing.