(add-download-extensions! extensions)Add file extensions to the download tracking list.
Add file extensions to the download tracking list.
(add-tracker! tracker-url site-id)Register an additional Matomo tracker with the given URL and site ID.
Register an additional Matomo tracker with the given URL and site ID.
(delete-custom-dimension! id)Delete a custom dimension by ID.
Delete a custom dimension by ID.
(delete-custom-variable! index)(delete-custom-variable! index scope)Delete a custom variable.
Delete a custom variable.
(delete-custom-variables! scope)Delete all custom variables for a scope ("visit" or "page").
Delete all custom variables for a scope ("visit" or "page").
(disable-cookies!)(disable-heart-beat-timer!)(disable-link-tracking!)(disable-performance-tracking!)(disable-queue-request!)Disable request queuing — send each tracking request immediately.
Disable request queuing — send each tracking request immediately.
(enable-cookies!)(enable-heart-beat-timer!)(enable-heart-beat-timer! active-seconds)Enable heartbeat pings to measure active time. active-seconds: seconds of inactivity before a ping is sent (default 15).
Enable heartbeat pings to measure active time. active-seconds: seconds of inactivity before a ping is sent (default 15).
(enable-js-error-tracking!)Automatically track unhandled JavaScript errors as events.
Automatically track unhandled JavaScript errors as events.
(enable-link-tracking!)(enable-link-tracking! enable?)Enable automatic tracking of download and outlink clicks.
Enable automatic tracking of download and outlink clicks.
(enable-performance-tracking!)(forget-user-opt-out!)Remove a previously set opt-out cookie, re-enabling tracking.
Remove a previously set opt-out cookie, re-enabling tracking.
(get-custom-dimension! id callback)Async: retrieve a custom dimension value. Calls (callback value).
Async: retrieve a custom dimension value. Calls (callback value).
(get-custom-variable! index callback)(get-custom-variable! index scope callback)Async: retrieve a custom variable value. Calls (callback value).
Async: retrieve a custom variable value. Calls (callback value).
(get-user-id! callback)Async: retrieve the current user ID. Calls (callback user-id-string).
Async: retrieve the current user ID. Calls (callback user-id-string).
(get-visitor-id! callback)Async: retrieve the visitor ID. Calls (callback visitor-id-string).
Async: retrieve the visitor ID. Calls (callback visitor-id-string).
(get-visitor-info! callback)Async: retrieve all visitor info as a ClojureScript map. Calls (callback info).
Async: retrieve all visitor info as a ClojureScript map. Calls (callback info).
(has-cookies? callback)Async: check whether any tracking cookies are set. Calls (callback bool).
Async: check whether any tracking cookies are set. Calls (callback bool).
(init!
matomo-url
site-id
&
{:keys [load-script? enable-link-tracking? track-page-view?]
:or {load-script? true enable-link-tracking? true track-page-view? false}})Initialize Matomo: sets tracker URL and site ID, then optionally loads matomo.js.
Options (keyword args): :load-script? (default true) — inject matomo.js into the page :enable-link-tracking? (default true) — enable automatic download/outlink tracking :track-page-view? (default false) — immediately track an initial page view
Initialize Matomo: sets tracker URL and site ID, then optionally loads matomo.js. Options (keyword args): :load-script? (default true) — inject matomo.js into the page :enable-link-tracking? (default true) — enable automatic download/outlink tracking :track-page-view? (default false) — immediately track an initial page view
(is-user-opted-out? callback)Async: check whether the user has opted out. Calls (callback bool).
Async: check whether the user has opted out. Calls (callback bool).
(opt-user-out!)Opt the current user out of all tracking (sets an opt-out cookie).
Opt the current user out of all tracking (sets an opt-out cookie).
(ping!)Send a ping request to keep the session alive.
Send a ping request to keep the session alive.
(push! & args)Push a command array to the Matomo _paq queue. This is the underlying primitive; prefer the typed API functions.
Push a command array to the Matomo _paq queue. This is the underlying primitive; prefer the typed API functions.
(remove-download-extensions! extensions)Remove file extensions from the download tracking list.
Remove file extensions from the download tracking list.
(reset-user-id!)Clear the user ID for the current visitor.
Clear the user ID for the current visitor.
(set-cookie-domain! domain)(set-cookie-name-prefix! prefix)(set-cookie-path! path)(set-cookie-same-site! same-site)Set the SameSite attribute on tracking cookies: "Lax", "Strict", or "None".
Set the SameSite attribute on tracking cookies: "Lax", "Strict", or "None".
(set-custom-dimension! id value)Set the value of a custom dimension.
Set the value of a custom dimension.
(set-custom-request-processing! f)Supply a function to transform request parameters before they are sent. The function receives and must return the query string.
Supply a function to transform request parameters before they are sent. The function receives and must return the query string.
(set-custom-url! url)Override the URL recorded for the current page.
Override the URL recorded for the current page.
(set-custom-variable! index var-name value)(set-custom-variable! index var-name value scope)Set a custom variable. scope: "visit" or "page".
Set a custom variable. scope: "visit" or "page".
(set-do-not-track! honor?)Honor (true) or ignore (false) the browser Do Not Track header.
Honor (true) or ignore (false) the browser Do Not Track header.
(set-document-title! title)Override the document title used for tracking.
Override the document title used for tracking.
(set-domains! domains)Set the list of domains treated as part of this site (cross-domain tracking).
Set the list of domains treated as part of this site (cross-domain tracking).
(set-download-classes! classes)CSS classes that mark links as downloads.
CSS classes that mark links as downloads.
(set-download-extensions! extensions)Replace the list of file extensions tracked as downloads.
Replace the list of file extensions tracked as downloads.
(set-excluded-query-params! params)Exclude specific URL query parameters from the tracked URL.
Exclude specific URL query parameters from the tracked URL.
(set-excluded-referrers! referrers)Exclude specific referrer URLs or domains from referrer tracking.
Exclude specific referrer URLs or domains from referrer tracking.
(set-ignore-classes! classes)CSS classes that cause link clicks to be ignored.
CSS classes that cause link clicks to be ignored.
(set-link-classes! classes)CSS classes that mark elements as outlinks.
CSS classes that mark elements as outlinks.
(set-link-tracking-timer! ms)Set the delay in ms before a link click is recorded.
Set the delay in ms before a link click is recorded.
(set-referral-cookie-timeout! seconds)(set-referrer-url! url)Override the referrer URL.
Override the referrer URL.
(set-request-content-type! content-type)Set the Content-Type header for POST tracking requests.
Set the Content-Type header for POST tracking requests.
(set-request-method! method)Set the HTTP method for tracking requests: "GET" or "POST".
Set the HTTP method for tracking requests: "GET" or "POST".
(set-request-queue-interval! ms)Set the flush interval in ms for batched tracking requests.
Set the flush interval in ms for batched tracking requests.
(set-secure-cookie! secure?)(set-session-cookie-timeout! seconds)(set-tracker-url! url)Set the Matomo tracker endpoint URL (e.g. "https://matomo.example.com/matomo.php").
Set the Matomo tracker endpoint URL (e.g. "https://matomo.example.com/matomo.php").
(set-user-id! user-id)Associate the current session with a known user ID (e.g. hashed email).
Associate the current session with a known user ID (e.g. hashed email).
(set-visitor-cookie-timeout! seconds)(set-visitor-id! visitor-id)Manually set the visitor cookie ID (must be a 16-character hex string).
Manually set the visitor cookie ID (must be a 16-character hex string).
(store-custom-variables-in-cookie!)Persist visit-scope custom variables in the visitor cookie.
Persist visit-scope custom variables in the visitor cookie.
(track-event! category action)(track-event! category action event-name)(track-event! category action event-name value)Track a custom event. Accepts keywords or strings for category/action/name.
Track a custom event. Accepts keywords or strings for category/action/name.
(track-goal! goal-id)(track-goal! goal-id revenue)Track a conversion goal by ID. Optionally pass custom revenue.
Track a conversion goal by ID. Optionally pass custom revenue.
(track-link! url link-type)(track-link! url link-type custom-data)(track-link! url link-type custom-data callback)Manually track a link click. link-type: "link" (outlink) or "download". custom-data and callback are optional.
Manually track a link click. link-type: "link" (outlink) or "download". custom-data and callback are optional.
(track-page-view!)(track-page-view! custom-title)Track a page view. Optionally supply a custom page title.
Track a page view. Optionally supply a custom page title.
(track-site-search! keyword)(track-site-search! keyword category)(track-site-search! keyword category result-count)Track an internal site search. keyword is required; category and result-count are optional.
Track an internal site search. keyword is required; category and result-count are optional.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |