Liking cljdoc? Tell your friends :D

de.baggerbagger.matomo-cljs.core


add-download-extensions!cljs

(add-download-extensions! extensions)

Add file extensions to the download tracking list.

Add file extensions to the download tracking list.
raw docstring

add-tracker!cljs

(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.
raw docstring

delete-custom-dimension!cljs

(delete-custom-dimension! id)

Delete a custom dimension by ID.

Delete a custom dimension by ID.
raw docstring

delete-custom-variable!cljs

(delete-custom-variable! index)
(delete-custom-variable! index scope)

Delete a custom variable.

Delete a custom variable.
raw docstring

delete-custom-variables!cljs

(delete-custom-variables! scope)

Delete all custom variables for a scope ("visit" or "page").

Delete all custom variables for a scope ("visit" or "page").
raw docstring

disable-cookies!cljs

(disable-cookies!)

disable-heart-beat-timer!cljs

(disable-heart-beat-timer!)

(disable-link-tracking!)

disable-performance-tracking!cljs

(disable-performance-tracking!)

disable-queue-request!cljs

(disable-queue-request!)

Disable request queuing — send each tracking request immediately.

Disable request queuing — send each tracking request immediately.
raw docstring

enable-cookies!cljs

(enable-cookies!)

enable-heart-beat-timer!cljs

(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).
raw docstring

enable-js-error-tracking!cljs

(enable-js-error-tracking!)

Automatically track unhandled JavaScript errors as events.

Automatically track unhandled JavaScript errors as events.
raw docstring

(enable-link-tracking!)
(enable-link-tracking! enable?)

Enable automatic tracking of download and outlink clicks.

Enable automatic tracking of download and outlink clicks.
raw docstring

enable-performance-tracking!cljs

(enable-performance-tracking!)

forget-user-opt-out!cljs

(forget-user-opt-out!)

Remove a previously set opt-out cookie, re-enabling tracking.

Remove a previously set opt-out cookie, re-enabling tracking.
raw docstring

get-custom-dimension!cljs

(get-custom-dimension! id callback)

Async: retrieve a custom dimension value. Calls (callback value).

Async: retrieve a custom dimension value. Calls (callback value).
raw docstring

get-custom-variable!cljs

(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).
raw docstring

get-user-id!cljs

(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).
raw docstring

get-visitor-id!cljs

(get-visitor-id! callback)

Async: retrieve the visitor ID. Calls (callback visitor-id-string).

Async: retrieve the visitor ID. Calls (callback visitor-id-string).
raw docstring

get-visitor-info!cljs

(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).
raw docstring

has-cookies?cljs

(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).
raw docstring

init!cljs

(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
raw docstring

is-user-opted-out?cljs

(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).
raw docstring

opt-user-out!cljs

(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).
raw docstring

ping!cljs

(ping!)

Send a ping request to keep the session alive.

Send a ping request to keep the session alive.
raw docstring

push!cljs

(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.
raw docstring

remove-download-extensions!cljs

(remove-download-extensions! extensions)

Remove file extensions from the download tracking list.

Remove file extensions from the download tracking list.
raw docstring

reset-user-id!cljs

(reset-user-id!)

Clear the user ID for the current visitor.

Clear the user ID for the current visitor.
raw docstring

(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".
raw docstring

set-custom-dimension!cljs

(set-custom-dimension! id value)

Set the value of a custom dimension.

Set the value of a custom dimension.
raw docstring

set-custom-request-processing!cljs

(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.
raw docstring

set-custom-url!cljs

(set-custom-url! url)

Override the URL recorded for the current page.

Override the URL recorded for the current page.
raw docstring

set-custom-variable!cljs

(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".
raw docstring

set-do-not-track!cljs

(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.
raw docstring

set-document-title!cljs

(set-document-title! title)

Override the document title used for tracking.

Override the document title used for tracking.
raw docstring

set-domains!cljs

(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).
raw docstring

set-download-classes!cljs

(set-download-classes! classes)

CSS classes that mark links as downloads.

CSS classes that mark links as downloads.
raw docstring

set-download-extensions!cljs

(set-download-extensions! extensions)

Replace the list of file extensions tracked as downloads.

Replace the list of file extensions tracked as downloads.
raw docstring

set-excluded-query-params!cljs

(set-excluded-query-params! params)

Exclude specific URL query parameters from the tracked URL.

Exclude specific URL query parameters from the tracked URL.
raw docstring

set-excluded-referrers!cljs

(set-excluded-referrers! referrers)

Exclude specific referrer URLs or domains from referrer tracking.

Exclude specific referrer URLs or domains from referrer tracking.
raw docstring

set-ignore-classes!cljs

(set-ignore-classes! classes)

CSS classes that cause link clicks to be ignored.

CSS classes that cause link clicks to be ignored.
raw docstring

(set-link-classes! classes)

CSS classes that mark elements as outlinks.

CSS classes that mark elements as outlinks.
raw docstring

(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.
raw docstring

(set-referral-cookie-timeout! seconds)

set-referrer-url!cljs

(set-referrer-url! url)

Override the referrer URL.

Override the referrer URL.
raw docstring

set-request-content-type!cljs

(set-request-content-type! content-type)

Set the Content-Type header for POST tracking requests.

Set the Content-Type header for POST tracking requests.
raw docstring

set-request-method!cljs

(set-request-method! method)

Set the HTTP method for tracking requests: "GET" or "POST".

Set the HTTP method for tracking requests: "GET" or "POST".
raw docstring

set-request-queue-interval!cljs

(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.
raw docstring

set-secure-cookie!cljs

(set-secure-cookie! secure?)

(set-session-cookie-timeout! seconds)

set-site-id!cljs

(set-site-id! site-id)

Set the Matomo site ID.

Set the Matomo site ID.
raw docstring

set-tracker-url!cljs

(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").
raw docstring

set-user-id!cljs

(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).
raw docstring

(set-visitor-cookie-timeout! seconds)

set-visitor-id!cljs

(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).
raw docstring

store-custom-variables-in-cookie!cljs

(store-custom-variables-in-cookie!)

Persist visit-scope custom variables in the visitor cookie.

Persist visit-scope custom variables in the visitor cookie.
raw docstring

track-event!cljs

(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.
raw docstring

track-goal!cljs

(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.
raw docstring

track-link!cljs

(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.
raw docstring

track-page-view!cljs

(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.
raw docstring

track-site-search!cljs

(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.
raw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close