fastmon Docs
Concepts

Applications

An application is one tracking snippet: its hashes, collection config, and the sites (domains) it serves.

An application is the tracking embed: it owns the snippet and all collection config. It serves one or many domains, each a site with its own dashboard.

The two hashes

Both hashes are on the application's card under ··· → IDs & hashes.

  • source_hash sits in the script URL (/s/{source_hash}.js) and picks the bundle.
  • collector_hash sits in the ingest URL (/c/{collector_hash}) and names the application a beacon belongs to.

Rotating regenerates both, invalidates the served script, and breaks a pasted Shopify pixel.

What gets collected: presets

A preset (minimal / standard / full, default standard) expands into individual flags, baked into the served bundle.

Where beacons go: the collector

collector_mode decides the host in the snippet:

  • default: fastmon's shared collector (fastmon.site), third-party.
  • relative: host-less /s/ and /c/ paths through your reverse proxy, first-party.
  • custom: a collector_endpoint host you control.

It's set at create time. See Implementation.

Unknown domains: site_policy

When a beacon arrives from a hostname that isn't a registered site, site_policy decides:

  • open (default, "Suggest"): the beacon is dropped and the hostname becomes a suggested domain you can adopt in one click.
  • auto: a site is created for the hostname and its traffic is kept.
  • strict: the beacon is dropped with no suggestion.

This holds for an application with one site too. A www. host beside the apex or a separate checkout host needs a site of its own.

Environment

environment marks an application prod or dev (default prod). Use dev to keep staging and preview apps out of your production traffic.

Platform, shop, and SPA

platform names the shop system or CMS the application runs on, for example shopware6, shopify, or prestashop. A platform you set yourself is manual, and later detection leaves it alone.

shop.active says whether the application is a shop, with shop.source for where that came from. Without a setting it follows the platform; an unknown platform leaves it null. spa is set by hand.

A Shopify application also serves the checkout event pixel.

Page-type detection

page_type.body_class reads the page type (home, product, cart, checkout) from the <body> class with the platform's ruleset. A platform alone does not turn it on, and Shopify and PrestaShop have no ruleset.

  • pagetype_rules: up to 24 class names of your own theme, each mapped to a page type.
  • page_type.url_rules: up to 10 URL patterns in the pattern syntax, first match wins.
  • Meta tag: <meta name="fm-page-type" content="product">, or page-type. Soft pageviews read it once your app rewrites it.

The collector takes the first source that gives a page type:

  1. The Server-Timing: pageType header.
  2. The page type meta tag.
  3. Your own body classes, then your own URL rules.
  4. The platform's ruleset, then the Shopify routes or the OXID cl controller.
  5. The checkout stage: cart on a cart path, checkout on a checkout or success path.

page-type-sources lists these sources in that order. detect-pagetype names the shop system and pagetype/discover proposes class names, without writing anything. See Tracker → pagetype_rules.

Checkout funnel

On by default, under shop.checkout. The collector marks each pageview whose URL matches a cart, checkout, or success pattern, and records cart requests sent via fetch/XHR. The three path lists inherit the built-in patterns (null) or replace them. Marking is forward-only, and visitors per stage need store_stitch. See Checkout funnel.

Traffic sampling

collection.sampling_rate stores a share of your visitors instead of all of them. The default is 1.0, and the API refuses a rate below 0.01. The edge keeps or drops a visitor's pageviews together, and a new rate applies within about a minute.

Pageviews, visitors, and error counts are scaled back up. Percentiles, shares, minimum-sample thresholds, the Beacon explorer, and histograms stay on the stored rows. Only an application that stores stitch is sampled, and every analytics response reports the setting in meta.sampling.

The checkout steps and purchases are exact at any rate, because they count stage events. The live view counts every visitor too. meta.sampling.estimated_metrics names the fields of a response that are estimates, and the dashboard marks them with ~.

PATCH /applications/{app_id}
{ "collection": { "sampling_rate": 0.5 } }

In the dashboard the rate is Share of visitors kept under Visitors & sampling.

Automatic sampling

collection.sampling_mode decides who sets the rate: you (manual, the default) or fastmon from the pageviews you booked (automatic). In the dashboard it is Set the share automatically under Visitors & sampling.

  • Steps: a fixed ladder from 100 % down to 1 %, at most one step a day.
  • Scope: production applications of an organization with a fixed pageview quota. Free, Enterprise, partner plans, fully covered clients and trials are left alone.
  • Quota: manual applications take their share first, and the automatic ones split the rest by traffic.
  • Writing the rate: in automatic mode a changed sampling_rate gets a 422, unless the same body sets sampling_mode to manual.
  • Changes: sampling_rate_changed_at and the audit log entry application.sampling_rate_changed record each move. Back in manual, the last step stays.

Fetch and XHR sampling

collection.fetch_xhr_sampling_rate keeps the fetch and XHR calls of a share of the stored visitors. The rest of each pageview is stored in full. A new application starts at 0.25, and the rate never applies above sampling_rate.

Call and error counts are scaled back up. Percentiles and the listed calls rest on the kept calls only. Cart interactions count at the pageview rate. In the dashboard the field is Share of visitors with fetch/XHR kept.

Recommended rate

GET /applications/{app_id}/sampling-recommendation recommends the rate that keeps about 20,000 pageviews a day over the last seven full days. It rounds up to the next 0.05, never goes below 0.2, and changes nothing. The dashboard shows it under the field, and Use fills it in.

Events

SettingDefaultEffect
event_trackingonTakes a shop's own events. fastmon turns it off on request. Shopify pixel checkout steps stay.
collection.ga4_ecommerceoffReads the seven GA4 ecommerce pushes with value, currency, and items. Dashboard: Read GA4 ecommerce events.
collection.data_layeroffReads every dataLayer push with an event name, without props. Dashboard: Read every dataLayer event.
collection.data_layer_prop_keysemptyUp to 30 top-level keys kept as props of data_layer events. Dashboard: Keys kept as properties.
collection.data_layer_modeblockblock drops the listed names, allow keeps only them. Dashboard: Filter by name.
collection.data_layer_namesemptyUp to 50 names for the mode, prefix* allowed. Applies at the collector within five minutes.

The dataLayer settings sit under Events from the dataLayer on the Shop tab. See Custom events → dataLayer.

Privacy settings for every site

site_defaults holds three settings that apply to every site of the application: data_retention_days (default 90), store_stitch and count_visitors_by. A site cannot override them. A domain that needs other values belongs in an application of its own.

What's on an application

The response groups its fields into page_type, shop, collection, collector, script, and site_defaults. Create and update take the same groups as partial objects, and reject any key they do not know.

FieldTypeNotes
idUUID v7Stable identifier.
organization_idUUID v7The owning organization.
namestringDisplay name.
environmentenumprod or dev. Default prod.
platformobject · nullableShop system or CMS: key, source, detected_via, detected_at.
shop.activebool · nullableWhether this is a shop. null follows the platform.
spaboolSingle-page app. Set by hand, default false.
collection.*bool · enumThe preset flags: sessions, fetch/XHR, error messages and frames, query keys and values, session_consent, template_url_ids. See Presets.
collection.sampling_ratenumberShare of visitors stored, 0.01 to 1.0, default 1.0. See Traffic sampling.
collection.sampling_modeenummanual (default) or automatic. See Automatic sampling.
collection.sampling_rate_changed_attimestamp · nullableWhen fastmon last moved the rate.
collection.ga4_ecommerce, collection.data_layer*bool · list · enumThe dataLayer bridge. See Events.
collection.fetch_xhr_sampling_ratenumberShare of visitors with fetch/XHR calls stored. See Fetch and XHR sampling.
page_type.body_classboolRead the page type from the <body> class. Off by default.
page_type.ruleslist · nullableYour own body classes mapped to page types. Read before the ruleset.
page_type.url_ruleslist · nullableYour own URL patterns mapped to page types. Read after your body classes.
shop.checkout.trackingboolCheckout funnel on (true, the default) or off. See Checkout funnel.
shop.checkout.*_pathslist · nullableURL patterns per funnel stage. null inherits the built-in patterns; a list replaces them.
collector.modeenumdefault / relative / custom.
collector.endpointstring · nullableCustom collector host (only for custom).
collector.proxy_secretobjectThe shared secret for a first-party proxy.
script.source_hashstringGlobally unique, in the script URL.
script.collector_hashstringGlobally unique, in the ingest URL.
script.source_versionstringPinned beacon template version (v1).
site_defaults.*int · bool · enumdata_retention_days, store_stitch, count_visitors_by. They apply to every site.
site_policyenumopen / auto / strict. Unknown-hostname handling.
is_activeboolWhen false, beacons are accepted but not written.

Six fields stay flat for the Shopware plugin: source_hash, collector_hash, proxy_secret, collector_mode, collector_endpoint and pagetype_ruleset.

On this page