[data-reveal]{opacity:1!important;transform:none!important}
AntelopeJS DMS
DocumentationConfiguration

Configuration

Every module option in antelope.config.ts, the DMS and API settings the module relies on, and the runtime Settings page.

The module reads its defaults from its antelope.config.ts entry. The Settings page overrides some of them at runtime, for the whole deployment, without a restart. Every option is optional.

antelope.config.ts typescript
"dms-marketing": {
  source: { type: "package", package: "@antelopejs/dms-marketing", version: "^0.12.0" },
  config: {
    geoipDatabasePath: "/var/lib/geoip/GeoLite2-Country.mmdb",
  },
},

Module options

OptionTypeDefaultDescription
trackerEnabledbooleantrueCollection switch for the whole module. Off, the tracker is a stub that does nothing and the collect endpoint drops every event. Settings overrides it from the first time a person pauses or resumes collection there.
rawEventsRetentionnumber (ms)90 daysHow long the module keeps raw events. Heatmaps, funnels and A/B results read them. Settings overrides it, from 1 to 366 days.
statisticsRetentionnumber (ms)395 daysHow long the module keeps daily rollups and sessions. Settings overrides it, from 1 to 760 days, and refuses a value shorter than the raw-events retention.
snapshotRetentionnumber (ms)30 daysHow long the module keeps page snapshots. The hourly cleanup never keeps a snapshot longer than the raw events. Settings overrides it, from 1 to 366 days, and refuses a value longer than the raw-events retention.
snapshotMaxBytesnumber (bytes)1 MiBCap on one page snapshot upload, measured compressed (gzip) when the browser compresses it. The module clamps it between 64 KiB and 8 MiB, which keeps a stored snapshot well under the 16 MiB document limit of MongoDB. A page past the cap gets no backdrop, and the preview says so.
sessionIdleTimeoutnumber (ms)30 minutesInactivity after which a session ends.
heatmapSampleRatenumber (0 to 1)0.1Share of page loads that record clicks, scrolls and snapshots. The data-heatmap-sample attribute of a site's tag overrides it for that site. Settings overrides it, from 0 to 100%.
visitorHashSecretstringgeneratedFeeds the salt of the visitor hash. Empty, the module uses a secret it generates and stores at first start. Set it explicitly when you run several instances.
geoipDatabasePathstringemptyAbsolute path of a MaxMind country database (.mmdb). It turns on the visitor-country dimension. The module resolves the IP address locally at ingestion and stores only the country code. Without it, only sessions imported with a country have one, and the overview lists those. The module ships no GeoIP data, so supplying the file is your licensing decision. Replacing the file takes a restart.
dashboardTrackingobjectoffMeasures the dashboard's own pages without a tag. See Tracking the dashboard itself.

Tracking the dashboard itself

dashboardTracking measures the usage of the dashboard's own pages in Marketing, for a demo, a playground or a back office. It needs no frontend code. The module loads its tracker on every dashboard page through its own frontend module.

antelope.config.ts typescript
"dms-marketing": {
  source: { type: "package", package: "@antelopejs/dms-marketing", version: "^0.12.0" },
  config: {
    dashboardTracking: {
      enabled: true,
      websiteName: "Dashboard",
      excludePaths: ["/settings/**"],
      snapshots: true,
    },
  },
},
KeyTypeDefaultDescription
enabledbooleanfalseOnly true turns it on. Off, the module provisions nothing, the dashboard loads no tracker, and the module registers its frontend exactly as without the option.
websiteNamestring"Dashboard"Name of the website when the module creates it, at most 100 characters. A website that already exists keeps its own name. Rename it on the Websites page.
excludePathsstring[][]Dashboard pages left uncounted, beside the sign-in pages and the module area, which are always excluded. Each value is /x (that page), /x/* (one segment below) or /x/** (the page and everything below). The module ignores other values.
snapshotsbooleanfalsePage snapshots on the dashboard's website, so its click heatmaps draw over the pages themselves. Only true enables them. The website masks the text of every capture, because a capture stores what an admin page shows. Form values are never captured. The value applies when the module creates the website, and later while nobody has changed the switch. Once someone turns snapshots on or off on the Websites page or over the API, their choice stands and the option no longer changes it. When the option does change the switch, the module discards the site's snapshots, as an owner's change does.

The option behaves as follows:

  • One website per workspace, created on first use. The first time a signed-in user opens the dashboard, the module creates a website for their workspace (tenant). The website is named websiteName, and its domain is the host the dashboard answered on. Its id derives from the tenant, so every instance and every tab computes the same id and a second visit creates nothing. A host the dashboard is later opened from, such as a staging name next to localhost, joins the website's extra hosts, up to the cap of 20. The website shows on the Websites page like any other. You can rename it, pause it with Collect data, or delete it. A deleted one comes back on the next dashboard visit while the option is on.
  • Signed-in pages only. The tracker loads once someone signs in and pauses as soon as they sign out. A workspace switch moves it to the new workspace's website without a reload, so no page of one workspace reaches another's website. The sign-in pages (/auth/**, the account switcher included) are never counted, whatever excludePaths says. During an identity change, the tracker drops new events until it points at the new website. It still sends the old queue under its original website.
  • The module area is never counted. Dashboard tracking measures the product you build, not the modules that AntelopeJS or the community ship. The modules page (/modules), the module store (/modules/store) and every page a module mounts (/modules/<module>/...) send no pageview, click, scroll depth, snapshot or custom event, whatever excludePaths says. The collector refuses those paths too, so an older tag or a hand-made beacon cannot add any. To measure a module of your own, track the pages of the site that uses it. The rule applies to the dashboard's website only, so another site with its own /modules page is counted as usual.
  • Single-page navigations count. The dashboard navigates without reloading, and the tracker counts each page it lands on, as on any single-page site (Tracker).
  • The module's privacy rules still apply. The tracker loads from the API origin the dashboard already talks to. It sets no cookie, the backend stores no IP address or user agent, and the tracker honours Do Not Track and Global Privacy Control. The collector does not tie pages to the account that browses them. It ignores the authenticated account, and visitors get the same monthly rotated hashes as on any site. Page snapshots are off by default on this website, but an owner can turn them on in the ordinary website settings. The server does not forbid it. Leave snapshots off, because a capture of an admin page stores the records it shows.
  • Workspaces stay apart, except for the platform owner. Each workspace's data lives in its own tenant, and a workspace owner sees only their own. On an install with several workspaces, a platform owner can read the dashboard heatmaps of another workspace, or of all of them combined, from the Pages & heatmaps view (Reading another workspace's dashboard). That view is read-only, and its snapshots are always text-masked. It works the same with or without dms-saas, because the workspaces come from the DMS core.

The dashboard's frontend reads the option when it starts. After you turn it on or off, restart ajs dms dev or rebuild the frontend with ajs dms build. The collection switch of the whole module (trackerEnabled, on the Settings page) pauses it like every other site.

Settings from other modules

ModuleSettingWhy
dmsauth.trustedProxiesNumber of reverse proxies in front of the backend. The module identifies visitors and rate-limits sources by the client address the DMS resolves. At 0 behind a proxy, every visitor looks like the proxy. Never set it higher than the number of proxies actually there. It replaces the module's own trustedProxyHops option, which Marketing 0.4 removed.
dmsauth.clientIpHeaderHeader the hosting platform writes with the client address. When it is set, the DMS reads the client address from it instead of counting proxies.
apicors.allowedOriginsOnly the console origins need it. The tracker posts text/plain, a CORS-safelisted type, and the backend checks the browser's Origin (or Referer) against each website's domains.

Runtime settings

The Settings page edits the collection switch, the three retentions and the heatmap sampling, for every tenant and website. A field left empty follows the config default above. Per-site options live in each website's settings on the Websites page: page snapshots, text masking, extra hosts and Collect data.