Metrics
Events
What your store records about what shoppers do, how visitors are counted under your consent rules, how to keep your own visits out, and the keys for front ends built elsewhere.
In the dashboard: A store, Admin, Developers, Event keys
Why the store records events
Why: Traffic, Products, Search terms and the funnels need to know what shoppers look at and do, and that knowledge should stay with you. How: your store records it itself, into its own database at Commernauts, with no outside analytics service. Nothing is sampled: every event counts.
Stores with a Commernauts theme and sites built in the CMS need no code and no setup. A site or app you build elsewhere sends the same events with a key (Admin, Event keys; see the developer page Events API).
What your pages send
Why: these show what visitors look at. How: a small script on every page sends them in the background after the page is shown, so pages stay as fast as before.
| Event | When | What it carries |
|---|---|---|
| page_view | Every page | The path, the title, the referrer, and utm_* from the address |
| session_start | The first event of a visit (made by the store) | The landing page |
| view_item | A product page is shown | The product |
| view_item_list, select_item | A group of products scrolls into view, or one of them is clicked | The list (the section's heading), the products and their position |
| view_promotion, select_promotion | A hero, banner, call to action or offer section is shown, or its link clicked | Its heading |
| view_cart | The cart page is shown | None |
| scroll | 90% of a page was read | percent_scrolled |
| outbound_click, file_download | A link to another site, or a file such as a PDF, is opened | The link |
| user_engagement | Once, as the visitor leaves the page | The time the page was in view |
What the store records itself
Why: carts, orders and searches are the numbers that matter most, and an ad blocker must not hide them. How: the store records them when they happen in its own checkout and API. When a front end sends one of these too, it is counted once.
| Event | When | What it carries |
|---|---|---|
| add_to_cart, remove_from_cart | The cart changes, on the store or through the cart API | The product, quantity and value |
| begin_checkout | The checkout page opens with something in the cart | The cart's items and value |
| add_shipping_info | A delivery is picked in checkout | The rate |
| add_payment_info | The order is placed and payment starts | The order's items, value and payment type |
| purchase | The payment arrives (or a gift card or saved card paid at once) | Order number, items, value, tax, shipping, coupon |
| refund | Money goes back, from the dashboard or at Stripe | Order number and the amount |
| search | The store search is used | The term, the number of results, and what it found: nothing, a product by its exact name, or products |
A search term that looks like an email address or a phone number is dropped before it is stored. A search typed on within a minute (mu, mug, mugs) is kept as one search with the longest term.
How visitors are counted
Why: a visitor count is useful without a cookie banner, and recognising someone across days needs their consent where the law asks for it. How: two layers, decided per visitor by your Markets (Admin, Settings, Markets).
- Every visitor is counted per day from a hash of their address, browser and your store, under a secret that changes every day and is then deleted. The address itself is never stored, and nothing is kept in their browser.
- Where the visitor's market allows it, the store also keeps a random visitor id in a first-party cookie, so returning visitors and visits over several days can be told apart. In an ask-first market that is only after the visitor pressed Accept; in an opt-out market until they opt out or their browser sends Global Privacy Control.
- Reject, an opt-out or Global Privacy Control removes the id at once. From then on that visitor is counted by the daily hash only.
A visit is a run of events from one visitor less than 30 minutes apart. Its source is read from its first page: utm_source, utm_medium and utm_campaign in the address, else the site it came from, grouped as Direct, Organic search, Paid search, Organic social, Paid social, Email, Referral, Affiliate or AI assistants.
What is left out
- Bots: search engines, monitors and anything Cloudflare scores as automated. Nothing of theirs is stored.
- Your team: a browser you mark on Event keys (Leave your own visits out) is kept out of every count.
- Debug events from a developer's front end: answered as debug, never counted.
- The editor's preview of your pages sends nothing.
- Page speed and script errors are not recorded per visitor: Commernauts staff watch how the store runs.
Event keys
Why: a headless site, an app or a server sends events from outside your store, and each should be filtered and cut off on its own. How: Admin, Developers, Event keys. Each one is a channel (Online Store is your theme) with its own key.
- A publishable key (epk_) sends events from a web page or an app. It cannot read anything and cannot report purchases. It is shown on the page whenever you need it, with the script tag to paste.
- A secret key (esk_) is for a server. It may also report purchases and refunds of orders made outside the store, so it is shown once when it is made. Keep it on the server only.
- Revoke a key and whatever sends with it stops within a minute. Deleting a channel revokes its keys; its events are kept.
- Leave your own visits out: open Mark this browser as your team, at the foot of Event keys, in each browser you use to look at your store. The link works for 10 minutes; that browser is then marked as your team for a year, and its events are not counted.
Who can change them: anyone who may change the store's settings (settings.write).
How long events are kept
Why: your plan decides how much history the store keeps. How: daily totals are kept for your plan's history (Starter 90 days, Growth 1 year, Scale 2 years, Custom 5 years); single events and visits for that long too, at most 90 days. Your plan also includes a number of events a month; see Usage and plan for what happens when they are used up.