05Tracking
Conversions and e-commerce
Default goals, conversion value, purchase with transaction_id and GA4-format items — how to tag the purchase path.
Gauss sees form submissions and contact clicks on its own, while a purchase and its amount are sent by your site as an event. This page covers the conversions turned on by default, how to pass a value, and how to tag the path from product page to payment using GA4 names.
Default goals
When a site is created, these events become goals right away, so conversions show up without any setup:
| Event | Where it comes from |
|---|---|
form_submit | sent by the tracker when a form is submitted |
contact_click | sent by the tracker on clicks on tel:, mailto:, WhatsApp, Telegram |
generate_lead | tagged by your site |
sign_up | tagged by your site |
purchase | tagged by your site |
The site owner can turn off goals they don't need in site settings. Automatic events are described in What's tracked automatically.
Conversion value
The amount goes into the event params, the same way as in GA4:
| Parameter | Type | What it is |
|---|---|---|
value | number | conversion value |
currency | string | currency code, such as USD; if omitted, the site currency is used |
transaction_id | string | order ID, for purchase only |
If an event has no value, the default value from the goal settings is used (for example, "lead = $50"). Send value as a number, not a string: 189, not "$189".
gauss('event', 'generate_lead', { value: 50, currency: 'USD' });During the beta, a site has one currency. Value reports (total, value per visit, by channel, campaign and landing page) are shown in the dashboard, which is currently in private beta (/beta).
Purchase: purchase
Send purchase on the payment success page. transaction_id is required: a repeat purchase with the same ID within 48 hours is dropped, so reloading the thank-you page doesn't double the revenue. Gauss doesn't store the ID itself, only a hash keyed with a site secret.
gauss('event', 'purchase', {
transaction_id: 'A-10293',
value: 189,
currency: 'USD',
items: [
{
item_id: 'CM-200',
item_name: 'CM-200 coffee machine',
item_brand: 'Brewlab',
item_category: 'Coffee machines',
price: 189,
quantity: 1,
},
],
});If the Gauss script can load after the call, add the stub from Custom events before it: calls are queued and sent once the script loads.
Products: items
items is an array of products in the GA4 format, up to 50 entries. Only these fields are accepted; the rest are dropped:
| Field | Type | Limit |
|---|---|---|
item_id | string | up to 100 characters |
item_name | string | up to 100 characters |
item_brand | string | up to 100 characters |
item_category … item_category5 | string | up to 100 characters |
item_variant | string | up to 100 characters |
price | number | 0 or more |
quantity | integer | 0 to 1,000,000 |
coupon | string | up to 100 characters |
If there are more than 50 entries, the tracker sends the first 50 and logs a warning to the console.
Purchase path with GA4 events
Gauss accepts GA4 recommended events under the same names: view_item, add_to_cart, begin_checkout, purchase (and also generate_lead, sign_up, login, refund). You can build a purchase funnel from them; see Goals, funnels and paths.
// product page
gauss('event', 'view_item', {
currency: 'USD',
value: 189,
items: [{ item_id: 'CM-200', item_name: 'CM-200 coffee machine', price: 189 }],
});
// "Add to cart" button
gauss('event', 'add_to_cart', {
currency: 'USD',
value: 189,
items: [{ item_id: 'CM-200', item_name: 'CM-200 coffee machine', price: 189, quantity: 1 }],
});
// checkout starts
gauss('event', 'begin_checkout', {
currency: 'USD',
value: 189,
items: [{ item_id: 'CM-200', price: 189, quantity: 1 }],
});
// payment success page: see the example aboveComing soon. GA4 adapter:
gtag('event', 'purchase', …)anddataLayer.push(…)calls will reach Gauss without retagging. Until then, duplicate the events you need withgauss('event', …). Details: GA4 compatibility.
Checking
Add ?gauss_debug=1 to the page address and place a test order: the tracker prints the event to the browser console exactly as it will send it. Parameters the tracker rejected and extra entries show up there as [gauss] dropped … warnings. Details: Verify your installation.
Good to know
- The tracker can't see a purchase on its own: revenue in reports depends entirely on how
purchaseis tagged. - Don't pass the buyer's email, phone or name in parameters: keys such as
email,phone,nameare dropped, and addresses and phone numbers in text values are replaced with[redacted](What data is collected). - An order placed a few days after the visit is linked to its source only within the same day. To count payments from your CRM, see Offline events.