Clerion
  • What it doesFeaturesUse cases
    Set upQuickstartMCP serverSecurity
  • Docs
  • Pricing
  • Privacy-first toolsPlausibleFathomMatomo
    Large platformsGoogle AnalyticsMixpanelCloudflare Web AnalyticsPostHogAmplitude
  • LearnGuidesWritingHelp centreChangelog
    CompanyAbout usContact
Sign inStart free trial
  • What it doesFeaturesUse cases
    Set upQuickstartMCP serverSecurity
  • Docs
  • Pricing
  • Privacy-first toolsPlausibleFathomMatomo
    Large platformsGoogle AnalyticsMixpanelCloudflare Web AnalyticsPostHogAmplitude
  • LearnGuidesWritingHelp centreChangelog
    CompanyAbout usContact
Sign inStart 14-day trial

Getting started

  • Introduction
  • Quickstart
  • Install on your platform
  • Import your history
  • Check your installation

Tracking

  • Custom events
  • Revenue by source

Visitor insight

  • Exit question
  • Rage clicks

Releases

  • Deploy markers

Integrations

  • MCP server

Reference

  • Script tag
  • JavaScript API
  • Configuration options
  • Consent banner
  • Dashboard filters
  • Export and retention
Docs menu

Getting started

  • Introduction
  • Quickstart
  • Install on your platform
  • Import your history
  • Check your installation

Tracking

  • Custom events
  • Revenue by source

Visitor insight

  • Exit question
  • Rage clicks

Releases

  • Deploy markers

Integrations

  • MCP server

Reference

  • Script tag
  • JavaScript API
  • Configuration options
  • Consent banner
  • Dashboard filters
  • Export and retention

Docs / Reference

View as Markdown

JavaScript API

The snippet creates the tracker as window.clerion once the page has loaded. Everything below is optional: pageviews, clicks, scroll, forms, speed, errors and rage clicks are tracked without any code.

Code that may run before the tracker exists should guard the call:

window.clerion?.trackEvent("signup");

trackEvent

window.clerion.trackEvent(name, details);

Records a custom event. Every name Clerion does not use itself appears on the Custom events page the first time it arrives. details is optional; three keys have meaning in the dashboard:

KeyWhat it does
valueSummed per event, and read by Revenue by source. orderValue and revenue are accepted as aliases. A number or a numeric string.
currencyShown next to the value.
pathOverrides the page the event is attributed to.
window.clerion.trackEvent("purchase", { value: 49, currency: "USD", plan: "starter" });

The full guide, with the HTML attribute alternative and the reserved names, is Custom events.

Attribute an event to a different page than the one it fired on, for example a modal that lives on every page:

window.clerion.trackEvent("demo_request", { path: "/book-a-demo" });

For TypeScript, declare the global once; the declaration is in Custom events.

trackPageView

window.clerion.trackPageView(path, details);

Records a pageview by hand. Rarely needed: the first pageview and every client-side route change are counted automatically. path defaults to the current page.

Commerce helpers

These record the built-in commerce events that feed the ecommerce funnel, product view to cart to checkout.

MethodRecords
trackProductView(productId, productName, { category, price })product_view
trackAddToCart(productId, productName, quantity, price, size)add_to_cart. quantity defaults to 1.
trackRemoveFromCart(productId, productName, quantity, price)remove_from_cart
trackCheckoutStart(products, orderValue)checkout_start
trackSearch(query, resultsCount)search
trackCategoryClick(categoryName)category_click
trackBannerClick(bannerIndex, details)banner_click
trackWishlistAdd(productId, productName, details)wishlist_add
trackWishlistRemove(productId, productName)wishlist_remove
trackFilterApply(filterType, filterValue, appliedFilters)filter_apply
trackSortChange(field, order)sort_change. order defaults to asc.

A completed purchase is not a built-in name. Send it with trackEvent and a value, so it counts as revenue.

Consent

window.clerion.setConsentStatus(true);

Records the visitor's choice, as Clerion's optional consent banner does. With consent given, Clerion keeps a visitor id for up to a year, which lets Revenue by source follow a visitor across visits. setConsentStatus(false) removes it, and that browser is not tracked on later visits. Without a choice, Clerion runs cookie-free and counts each visit on its own.

Limits on details

LimitValue
Size5 KB per event. Larger payloads are rejected and the event is not stored.
StringsTruncated at 500 characters.
Arrays50 items.
Nesting5 levels.
Keys100 characters.

Do not put personal data in event details. A plan name is fine; an email address is not.

PreviousScript tagNextConfiguration options

Something missing or wrong here? Write to hello@getclerion.com, or ask from inside the app.

On this page

  • trackEvent
  • trackPageView
  • Commerce helpers
  • Consent
  • Limits on details

Clerion (“Clerion”), at getclerion.com and clerion.si, is website intelligence for AI founders: web analytics, AI-assistant traffic, conversions and revenue by source, SEO and AI-readiness, speed and errors from one script tag. It finds the patterns in the data, ranks what changed and tells you the fix. AI is now also called SI, super intelligence; the channel is the same. It sets no cookies, stores no personal data, needs no consent banner, and holds data in the EU.

Every briefing is written from your own numbers, and every figure in it comes from your data rather than from the model. Clerion is a software product and does not provide marketing, legal or advisory services. We have no ad budget: if Clerion helps you, telling a friend does more for us than any campaign could.

© 2026 Clerion. Independent and self-funded.

XLinkedInMedium

Product

  • Features
  • Use cases
  • Docs
  • Quickstart
  • MCP server
  • Pricing
  • Sign in

Compare

  • vs Google Analytics
  • vs Plausible
  • vs Fathom
  • vs Matomo
  • vs Mixpanel
  • vs Cloudflare
  • vs PostHog
  • vs Amplitude

Resources

  • Learn
  • Writing
  • Help centre
  • AI crawler checker
  • What is SI?
  • What is Clerion?
  • Changelog
  • Sitemap

Company

  • About us
  • CareersHiring
  • Brand
  • Contact
  • Security
  • Privacy policy
  • Terms

Compliance

  • GDPR
  • Schrems II
  • ePrivacy
  • PECR
  • COPPA
  • CCPA
  • Our data journey