Frontend layout
How the Marketing pages are declared on the backend, which blocks are stock DMS blocks and which are module components, and how the Vue layer reads and renders them.
The Marketing pages are declared on the backend and drawn mostly with stock DMS blocks. A small Vue layer adds the components that no stock block can draw. This page maps the pages, the blocks and that layer.
Frontend layout
The pages are DMS page controllers of the module marketing (src/pages/module.ts), declared in src/pages/. Each one is a tree of interface-dms blocks. The sidebar headings are three label categories with urlSlug: "/", so they group the pages without entering their URLs.
| Heading | Page | URL |
|---|---|---|
| Analytics | Overview | /modules/marketing/overview |
| Analytics | Acquisition | /modules/marketing/acquisition |
| Analytics | Pages & heatmaps | /modules/marketing/pages, with ?path= |
| Conversion | Funnels & A/B tests | /modules/marketing/funnels |
| Conversion, hidden | Funnel | /modules/marketing/funnel?id= |
| Conversion, hidden | Funnel builder | /modules/marketing/funnel-builder |
| Setup | Websites | /modules/marketing/websites |
| Setup, hidden | Install the tracker | /modules/marketing/install, with ?website= |
| Setup | Settings | /modules/marketing/settings |
The funnel builder takes ?id= to edit a funnel, ?copy= to duplicate one, ?split=1 to turn the split on (for an edited funnel too) and ?steps= for a template. Links to the builder carry the page's context, and the builder's own links keep it. Hidden pages are reached from the other pages, never from the sidebar.
Stock blocks first, module components where needed
Stock blocks render everything a stock block can: KpiCard, ChartCard, TopListCard, Grid, KeyValueList, Section, FieldRow, Meter, Form, StatGroup, Banner and TableView.fromSource. The analytics blocks bind to the marketing period scope and read the /blocks/* routes for the page's website.
The rest are module blocks, CustomComponent("DmsMarketing<Name>") built with MarketingBlock() (src/pages/blocks.ts):
Context, the context bar and first-run gateTopListTabsChannelsCardPagesExplorer, the page inventory and heatmap previewFunnelTemplates, the first-run state of the funnels tableFunnelReport, withFunnelFigureandExperimentReportFunnelBuilderInstallGuide
The Websites page is a stock TableView over the websites data controller, whose card.component is DmsMarketingWebsiteCard. Its default row action opens DmsMarketingWebsiteSettings in a modal (?record=<id>), and its header button opens DmsMarketingWebsiteCreate.
The Collection section of Settings is a stock Banner that the route words (/settings/collection/banner), with the pause behind a confirmation and the resume as its actions. The Settings forms share their field definitions with the endpoint's validation schema (src/pages/settings/form.ts).
Sidebar counts and the catalog tile
The DMS sidebar carries two counts (navBadge). Funnels shows the running A/B tests. Websites shows the websites still waiting for their first pageview.
The module's catalog tile shows the package version, the Analytics catalog category, and a status and readout line. While collection is off, the status turns to attention and the readout to Collection is paused (src/services/catalog.ts).
The Vue layer
The module blocks ship as a DMS frontend module in frontend-vue/, a Vue project. Its root dms.frontend.ts declares componentPrefix: "DmsMarketing" and registers every component of app/components/ under its bare file name, such as Context or FunnelReport. dms-frontend adds the prefix, so the backend addresses them as DmsMarketingContext or DmsMarketingFunnelReport. The file also registers the funnel-steps DataType plugin.
Composables and utils are imported by path, not auto-imported, which keeps them testable with plain vitest.
What a page renders is read with the DMS useApiData (composables/useMarketingReads.ts). A server render reads it and hands it to the browser with the page. Context reads the websites before its blocks set up. A URL that names no website is then redirected to the saved one, and its blocks render on the server with their period, once the browser's time zone cookie is known. The page preview's frames and the funnel builder's working copy read in the browser (useMarketingApi).
On a client navigation, Context first writes the website into the URL, then renders its blocks. The blocks set up while the page's suspense is pending. A block that holds the navigation for its data, such as a fetched banner, and the chunks it waits on then appear with the page, not a moment later.
The frontend builds with Vite alone, not Nuxt. A server or browser branch reads import.meta.env.SSR, because Nuxt's import.meta.client is undefined there. Every registered component is a lazy chunk of its own, so a component that always draws another one, such as the Pages explorer and its preview, imports it by path.
The i18n keys live under page.marketing.*, in English (en-GB) and French (fr-FR), in frontend-vue/i18n/locales/. The loader merges them into the console's catalog.
AddFrontendModule (src/index.ts) publishes the directory to the backend's frontend manifest. ajs dms copies it into the generated Inertia workspace that it builds and serves.