Monitor a website
Global monitoring watches every outbound request from the page to the vendors you configure — regardless of whether the tag was loaded by a tag manager, the CMS, or hard-coded HTML. One script, one token, any number of hostnames.
It can monitor:
- Marketing and conversion pixels (Meta, Google Ads, TikTok, …)
- Analytics and CDP events (GA4, Adobe Analytics, Segment, Tealium Collect)
- Data layer events and any other outgoing HTTP request whose URL you know
Set up in Monita
Section titled “Set up in Monita”-
Create a property in the app with source type Website, and choose the system you deploy through. The script is the same everywhere — each flavour just auto-detects extra TMS context:
System Auto-detected context Google Tag Manager container ID and version (from google_tag_manager)Adobe Launch property and build (from _satellite)Tealium iQ profile and version (from utag)Commanders Act account, container, environment (from tC)Global (any TMS / no TMS) none — works anywhere -
Add the hostnames you want to ingest events from. Hostnames seen in real traffic are also registered to the property automatically.
-
Add vendors — search the catalog or create a custom vendor. Each vendor form has four fields that matter:
- Domains — the vendor’s request URL to match, e.g.
facebook.com/trfor Meta Pixel. - Excluded parameters — keys you don’t need monitored. Accepts regex between slashes:
/^(data\.loader|data\.timing)\./excludes everything starting with those prefixes. - Event mapping field — which payload key holds the event name. Combine fields with
{{fieldA}}-{{fieldB}}, or extract with regex usingregex::<expression>::<field>(e.g.regex::(?<=https:\/\/)[\w|-]*::urlpulls the subdomain out ofurl). - Filters — only monitor matching requests, e.g.
ev=orderSuccess. Also reduces event consumption.
- Domains — the vendor’s request URL to match, e.g.
-
Open Manage → Installation guide and copy the snippet for your system.
Deploy the script
Section titled “Deploy the script”Add a Custom HTML tag with the snippet from your installation guide, triggered on All Pages, then submit and publish the workspace. Prefer the GTM integration if you’d like Monita to install its template into your workspace for you (you still review and publish).
Create a rule with a Custom Code action containing the snippet, triggered on Library Loaded (Page Top) so it runs as early as possible, on all pages. Build and publish the library to the environment you’re monitoring — an unpublished library is the most common reason no data arrives.
Add a JavaScript Code extension, scoped to All Tags (or Pre Loader), paste the snippet, then save and publish your profile.
Add the snippet as a JavaScript tag deployed on all pages, as early as the container allows, then deploy the container.
Place the snippet in the <head> of every page, before your tag manager or vendor scripts, so nothing fires before Monita is watching.
Page hooks (consent, session, customer ID)
Section titled “Page hooks (consent, session, customer ID)”Before the script loads, you can define hooks on window.__monita_settings to enrich every event:
<script> window.__monita_settings = window.__monita_settings || {}; Object.assign(window.__monita_settings, { get_consent: function () { // Return your CMP's consent state, e.g. OneTrust: return window.OnetrustActiveGroups; }, get_session_id: function () { return sessionStorage.getItem('sid'); }, get_customer_id: function () { return getCookie('cust_id'); }, });</script>get_consent→ populatescn, feeding consent posture. Monita understands OneTrust group strings, Didomi state, IAB TCF strings, vendor lists and simple yes/no values.get_session_id/get_customer_id→ join events into sessions and users across web, mobile and server-side sources.get_event(vendorName, data)→ override event-name extraction in code when field mapping isn’t enough.is_monita_allowed(payload)→ returnfalseto suppress monitoring for a given event.
Verify the deployment
Section titled “Verify the deployment”-
Visit your site (ad blockers off) and type
__monita_settingsin the browser console — if it’s defined, the script is loaded, and it reports the deployed script version. -
Open the Network tab, fire a monitored vendor, and filter for
collect.monita.ai— you should seePOSTrequests returning 204. Details: Verifying network requests. -
In the app, open the property’s Visualisation view — events arrive grouped by vendor and event within a minute or two.
-
Need to force-refresh the script after a config change? Add
?monitarefresh=1to your page URL and reload.
If any step fails, walk through Deployment troubleshooting.