Skip to content

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:

EventWhere it comes from
form_submitsent by the tracker when a form is submitted
contact_clicksent by the tracker on clicks on tel:, mailto:, WhatsApp, Telegram
generate_leadtagged by your site
sign_uptagged by your site
purchasetagged 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:

ParameterTypeWhat it is
valuenumberconversion value
currencystringcurrency code, such as USD; if omitted, the site currency is used
transaction_idstringorder 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".

js
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.

js
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:

FieldTypeLimit
item_idstringup to 100 characters
item_namestringup to 100 characters
item_brandstringup to 100 characters
item_category … item_category5stringup to 100 characters
item_variantstringup to 100 characters
pricenumber0 or more
quantityinteger0 to 1,000,000
couponstringup 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.

js
// 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 above

Coming soon. GA4 adapter: gtag('event', 'purchase', …) and dataLayer.push(…) calls will reach Gauss without retagging. Until then, duplicate the events you need with gauss('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 purchase is tagged.
  • Don't pass the buyer's email, phone or name in parameters: keys such as email, phone, name are 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.

Apply for the beta

The beta is closed and limited to 20–30 sites. We review every application and reply by email with the price and terms.

Without https:// or a path.